Closedown

This commit is contained in:
boccioli_m
2015-09-04 15:32:27 +02:00
parent fec500b60b
commit ceb1aaa9cf
2 changed files with 7 additions and 6 deletions

View File

@@ -27,15 +27,17 @@ class TestingTool:
return None
#print/log information
#test = the string to be printed/logged
#text = the string to be printed/logged
def log(self, text):
import time
time.ctime()
now = time.strftime('%Y.%m.%d %H:%M:%S')
logText = self.deviceName + ' - ' + self.testName + ': ' + str(text)
print now + ' ' + logText
log(logText)
try:
log(logText)
except:
#prepare and send feedback to calling tool
# returnString = the string containing info on the test result
# testPassed = true if the test was successful, false if test had a problem

View File

@@ -126,9 +126,8 @@ def startTest(testName, DEVICE, params):
#IMPORTANT: if the test was successful, write the report into the variables ret and success.
#for example, write the following:
ret = "Example - Test successful, here some detail: ..."
success = True
test.sendFeedback(ret, success)
ret = "Example Test successful"
success = True
#once the test is finished, no need to do anything. The code below yours will do the rest.
################ End of Example ##########