Files
ncs/script/pshellTestGeneral.py
boccioli_m 104d203536 Startup
2015-08-28 17:35:28 +02:00

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