summaryrefslogtreecommitdiff
path: root/test-cli/test/runners
diff options
context:
space:
mode:
Diffstat (limited to 'test-cli/test/runners')
-rw-r--r--test-cli/test/runners/simple.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/test-cli/test/runners/simple.py b/test-cli/test/runners/simple.py
index 22fe449..2eb61a4 100644
--- a/test-cli/test/runners/simple.py
+++ b/test-cli/test/runners/simple.py
@@ -59,8 +59,9 @@ class TextTestResult(unittest.TestResult):
def addError(self, test, err):
unittest.TestResult.addError(self, test, err)
- test.longMessage = err[1]
+ # test.longMessage = err[1]
self.result = self.ERROR
+ print(err[1])
def addFailure(self, test, err):
unittest.TestResult.addFailure(self, test, err)
@@ -73,17 +74,13 @@ class TextTestResult(unittest.TestResult):
self.runner.writeUpdate(self.result)
# save result data
for result in test.getresults():
- if "desc" in result.keys() and result["desc"]:
- if "type" in result.keys() and "data" in result.keys():
- if result["type"] == "string":
- self.__pgObj.upload_result_string(test.params["testidctl"], test.params["testid"],
- result["desc"], result["data"])
- elif result["type"] == "file":
- self.__pgObj.upload_result_file(test.params["testidctl"], test.params["testid"],
- result["desc"], result["data"])
+ self.__pgObj.upload_result_file(test.params["testidctl"], test.params["testid"],
+ result["description"], result["filepath"], result["mimetype"])
# SEND TO DB THE RESULT OF THE TEST
if self.result == self.PASS:
status = "TEST_COMPLETE"
+ resulttext = test.gettextresult()
else:
status = "TEST_FAILED"
- self.__pgObj.finish_test(test.params["testidctl"], test.params["testid"], status)
+ resulttext = test.longMessage
+ self.__pgObj.finish_test(test.params["testidctl"], test.params["testid"], status, resulttext)