From 3936d45b5ec0d4fb93f8bcbcf913817cf44b8dbd Mon Sep 17 00:00:00 2001 From: boccioli_m Date: Wed, 2 Sep 2015 10:39:05 +0200 Subject: [PATCH] Closedown --- script/testcommons.py | 11 ++++++++++- .../tests/PS Tests/power-supply-A/power-supply-A.py | 6 +++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/script/testcommons.py b/script/testcommons.py index ba8f115..01760a4 100644 --- a/script/testcommons.py +++ b/script/testcommons.py @@ -4,7 +4,16 @@ import sys, inspect, os, traceback class TestingTool: pippo = 'pippo' - def print_log(self, testName, DEVICE, text): + deviceName = '' + testName = '' + testPath = '' + + def __init__(self, testName, testPath, DEVICE): + self.deviceName = DEVICE + self.testName = testName + self.testPath = testPath + + def print_log(self, text): import time time.ctime() now = time.strftime('%Y.%m.%d %H:%M:%S') 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 f8072da..23cb136 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 @@ -13,14 +13,14 @@ def sendFeedback(testPath, testName, DEVICE, returnString, testPassed): def startTest(testName, DEVICE, params): #get the path of this script - testTool = testcommons.TestingTool() - testTool.print_pio() + test = testcommons.TestingTool(testName, DEVICE) + test.print_pio() import inspect testPath = inspect.getfile(inspect.currentframe()) #by default, failed ret = 'Test failed' - status = False + status = False #plot name to be given to the scan. Use: scan.setPlotName(plotName) plotName = DEVICE + ' - ' + testName #########################################