From c41ce07c697bff746bf290ea522068e16eeede84 Mon Sep 17 00:00:00 2001 From: boccioli_m Date: Thu, 2 Jul 2015 14:17:36 +0200 Subject: [PATCH] Closedown --- plugins/TestingList.java | 10 +++++----- .../Collimator Tests/Motor Test 2/Motor Test 2.py | 5 +---- .../tests/PS Tests/power-supply-A/power-supply-A.py | 11 +++++------ .../tests/PS Tests/power-supply-B/power-supply-B.py | 11 +++++------ 4 files changed, 16 insertions(+), 21 deletions(-) diff --git a/plugins/TestingList.java b/plugins/TestingList.java index 667cca4..f0b180d 100644 --- a/plugins/TestingList.java +++ b/plugins/TestingList.java @@ -817,7 +817,7 @@ public class TestingList extends Panel { public class RunTest implements Runnable { private HashMap mParameters; - private HashMap args; + //private HashMap args; private HashMap hTests; public RunTest() { @@ -888,7 +888,7 @@ public class TestingList extends Panel { //start all the tests in the rowsToExecute private int executeParallelTestsGroup(int[] rowsToExecute) { int iRet = -1; - HashMap args = new HashMap(); //this is the global map that will contain one map per test. + HashMap args2 = new HashMap(); //this is the global map that will contain one map per test. HashMap testArgs; //this is the map for a test. RunTest runTest; String sTestName="", sDeviceName="", sTestPath=""; @@ -916,9 +916,9 @@ public class TestingList extends Panel { System.out.println("Running test '" + sTestName + "'. No parameters found."); } - args.put(sTestPath,testArgs); + args2.put(sTestPath,testArgs); - hTests = args; + hTests = args2; iRet = 0; } catch (Exception ex) { SwingUtils.showMessage(TestingList.this.getComponent(), "executeTest()", ex.toString()); @@ -938,7 +938,7 @@ public class TestingList extends Panel { int i = 0; int iTotalEntries = hTests.entrySet().size(); for(Map.Entry hTest : hTests.entrySet()){ - setGlobalsVars(hTest.getValue()); + //setGlobalsVars(hTest.getValue()); //set global variables that can be read by all test scripts sTestPath = hTest.getKey().toString(); sTestPath = sTestPath.replace("\\","\\\\"); //System.out.println(hTest.getValue().get("test")); diff --git a/script/tests/tests/Collimator Tests/Motor Test 2/Motor Test 2.py b/script/tests/tests/Collimator Tests/Motor Test 2/Motor Test 2.py index 7d477a2..eff7c3b 100644 --- a/script/tests/tests/Collimator Tests/Motor Test 2/Motor Test 2.py +++ b/script/tests/tests/Collimator Tests/Motor Test 2/Motor Test 2.py @@ -184,7 +184,7 @@ def startTest(testName, DEVICE, params): def sendFeedback(testPath, testName, DEVICE, returnString, testPassed): print_log(testName, DEVICE, 'End of test. Result:') print_log(testName, DEVICE, 'Test path: ' + testPath) - print_log(testName, DEVICE, 'Test name: ' + testName ) + print_log(testName, DEVICE, 'Test name: ' + testName) print_log(testName, DEVICE, 'Device: ' + DEVICE) print_log(testName, DEVICE, 'Test passed: ' + str(testPassed)) print_log(testName, DEVICE, 'Return string: ' + returnString) @@ -203,6 +203,3 @@ testName = test params = parameters #launch the test startTest(testName, DEVICE, params) - - - diff --git a/script/tests/tests/PS Tests/power-supply-A/power-supply-A.py b/script/tests/tests/PS Tests/power-supply-A/power-supply-A.py index d8ca3bb..deade75 100644 --- a/script/tests/tests/PS Tests/power-supply-A/power-supply-A.py +++ b/script/tests/tests/PS Tests/power-supply-A/power-supply-A.py @@ -9,10 +9,9 @@ def startTest(testName, DEVICE, params): #plot name to be given to the scan. Use: scan.setPlotName(plotName) plotName = DEVICE + ' - ' + testName ###### WRITE YOUR CODE HERE BELOW ####### - print 'testpath A: ' + testPath - print 'parameters:' - print params - print 'device: ' + DEVICE + print_log(testName, DEVICE, 'testpath A: ' + testPath ) + print_log(testName, DEVICE, 'parameters: ' + str(params) ) + print_log(testName, DEVICE, 'device: ' + DEVICE ) scan = ManualScan(['time'], ['SetV', 'ActualV', 'ActualI'] , [0.0], [30.0], [20]) scan.setPlotName(plotName) scan.start() @@ -41,7 +40,7 @@ def startTest(testName, DEVICE, params): SetRamp.put(10.0, timeout=None) #set voltage to 0 - print 'Ramping down power supply A to 0V' + print_log(testName, DEVICE, 'Ramping down power supply A to 0V' ) SetV.put(0.0, timeout=None) #wait up to 2 minutes for voltage to be ~0 @@ -53,7 +52,7 @@ def startTest(testName, DEVICE, params): #Dimension 1 #LinearPositioner SetV - print 'Ramping up power supply A' + print_log(testName, DEVICE, 'Ramping up power supply A' ) for setpoint1 in frange(0.0, 20.0, 5.0, True): if setpoint1 > 50.0 or setpoint1 < 0.0: break diff --git a/script/tests/tests/PS Tests/power-supply-B/power-supply-B.py b/script/tests/tests/PS Tests/power-supply-B/power-supply-B.py index 7bbc701..37beb0c 100644 --- a/script/tests/tests/PS Tests/power-supply-B/power-supply-B.py +++ b/script/tests/tests/PS Tests/power-supply-B/power-supply-B.py @@ -9,10 +9,9 @@ def startTest(testName, DEVICE, params): #plot name to be given to the scan. Use: scan.setPlotName(plotName) plotName = DEVICE + ' - ' + testName ###### WRITE YOUR CODE HERE BELOW ####### - print 'testpath B: ' + testPath - print 'parameters:' - print params - print 'device: ' + DEVICE + print_log(testName, DEVICE, 'testpath B: ' + testPath ) + print_log(testName, DEVICE, 'parameters:' + str( params) ) + print_log(testName, DEVICE, device: ' + DEVICE ) scan = ManualScan(['time'], ['SetVB', 'ActualVB', 'ActualIB'] , [0.0], [30.0], [20]) scan.setPlotName(plotName) scan.start() @@ -40,7 +39,7 @@ def startTest(testName, DEVICE, params): SetRamp.put(10.0, timeout=None) #set voltage to 0 - print 'Ramping down power supply B to 0V' + print_log(testName, DEVICE, 'Ramping down power supply B to 0V') SetVA.put(0.0, timeout=None) #wait up to 2 minutes for voltage to be ~0 @@ -52,7 +51,7 @@ def startTest(testName, DEVICE, params): #Dimension 1 #LinearPositioner SetVA - print 'Ramping up power supply' + print_log(testName, DEVICE, 'Ramping up power supply') for setpoint1 in frange(0.0, 20.0, 5.0, True): if setpoint1 > 50.0 or setpoint1 < 0.0: break