diff --git a/config/users b/config/users index 5e3bdb3..00095b8 100644 Binary files a/config/users and b/config/users differ diff --git a/script/testcommons.py b/script/testcommons.py index a096d24..81d6b50 100644 --- a/script/testcommons.py +++ b/script/testcommons.py @@ -1,13 +1,23 @@ -global print_log, sendFeedback, inspect +global print_log, sendFeedback, sys, inspect, os, traceback import sys, inspect, os, traceback def print_log(testName, DEVICE, text): time.ctime() now = time.strftime('%Y.%m.%d %H:%M:%S') print now + ' ' + DEVICE + ' - ' + testName + ': ' + str(text) - log( now + ' ' + DEVICE + ' - ' + testName + ': ' + str(text)) + +#prepare and send feedback to calling tool +def sendFeedback(testPath, testName, DEVICE, returnString, testPassed): + print_log(testName, DEVICE, 'End of test. Result:') + print_log(testName, DEVICE, 'Device: ' + DEVICE) + print_log(testName, DEVICE, 'Test name: ' + testName) + print_log(testName, DEVICE, 'Test path: ' + testPath) + print_log(testName, DEVICE, 'Test passed: ' + str(testPassed)) + print_log(testName, DEVICE, 'Return string: ' + returnString) + ret = [testPath, DEVICE, returnString, testPassed] + set_return(ret) pippo = 'pippo' def print_pio(): - print 'pio' \ No newline at end of file + print 'piopio' \ No newline at end of file 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 2981542..dc3e80d 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 @@ -1,24 +1,8 @@ ######################################### ###### DO NOT MODIFY THE CODE BELOW ##### ######################################### -global print_log, sendFeedback, sys, inspect, os, traceback -import sys, inspect, os, traceback - -def print_log(testName, DEVICE, text): - time.ctime() - now = time.strftime('%Y.%m.%d %H:%M:%S') - print now + ' ' + DEVICE + ' - ' + testName + ': ' + str(text) - -#prepare and send feedback to calling tool -def sendFeedback(testPath, testName, DEVICE, returnString, testPassed): - print_log(testName, DEVICE, 'End of test. Result:') - print_log(testName, DEVICE, 'Device: ' + DEVICE) - print_log(testName, DEVICE, 'Test name: ' + testName) - print_log(testName, DEVICE, 'Test path: ' + testPath) - print_log(testName, DEVICE, 'Test passed: ' + str(testPassed)) - print_log(testName, DEVICE, 'Return string: ' + returnString) - ret = [testPath, DEVICE, returnString, testPassed] - set_return(ret) +global testcommons +import testcommons def startTest(testName, DEVICE, params): #get the path of this script @@ -39,7 +23,7 @@ def startTest(testName, DEVICE, params): scan = ManualScan(['time'], ['SetV', 'ActualV', 'ActualI']) scan.setPlotName(plotName) scan.start() - + testcommons.print_pio() try: #Creating channels: dimension 1 #Ramp rate