22 lines
879 B
Python
22 lines
879 B
Python
global print_log, sendFeedback, inspect
|
|
import sys, inspect, os, traceback, time
|
|
|
|
def print_log(testName, DEVICE, text):
|
|
time.ctime()
|
|
now = time.strftime('%Y.%m.%d %H:%M:%S')
|
|
textToLog = now + ' ' + DEVICE + ' - ' + testName + ': ' + str(text)
|
|
print textToLog
|
|
|
|
|
|
#prepare and send feedback to calling tool
|
|
def buildFeedback(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]
|
|
return ret
|
|
|
|
|