Startup
This commit is contained in:
22
script/pshellTestGeneral.py
Normal file
22
script/pshellTestGeneral.py
Normal file
@@ -0,0 +1,22 @@
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user