From 9e8b6f89a5b2691858516403f886138f7a3f6c8c Mon Sep 17 00:00:00 2001 From: boccioli_m Date: Wed, 2 Sep 2015 10:07:38 +0200 Subject: [PATCH] Closedown --- config/users | Bin 384 -> 355 bytes script/testcommons.py | 16 ++++++++++--- .../PS Tests/power-supply-A/power-supply-A.py | 22 +++--------------- 3 files changed, 16 insertions(+), 22 deletions(-) diff --git a/config/users b/config/users index 5e3bdb377fefb35ff998498a6616056a3c0aa5a9..00095b87b8329c91cae597dc7412703356aebd63 100644 GIT binary patch delta 94 zcmZo*e#|sMMz-;i?9AhdbD0?!JsDVvGpkZ73K$p|n95l|W(bMGQ(4ZN(>k wFqh^iE=kNwNi0e!VPH?sPfE&%wl`ycoq^2d7=9Cl{GSo3JF*4MFXtojt-o%vL%)HFvlA^?te4sks^!%ix d{P;wOItI8pj^dKUyp+VEloAG((&E&j3IH~CDKP*5 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