aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/agl_test_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/agl_test_base.py')
-rw-r--r--plugins/agl_test_base.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/plugins/agl_test_base.py b/plugins/agl_test_base.py
index 3a0bab4..b30f841 100644
--- a/plugins/agl_test_base.py
+++ b/plugins/agl_test_base.py
@@ -1,4 +1,6 @@
import pytest
+import os
+import json
import plugins.agl_test_utils as utils
import plugins.agl_test_conf as conf
@@ -111,3 +113,23 @@ class AGLBaseTest:
def precheck(self):
return True;
+
+ def write_skip_info(self):
+ test_info = {"status":"skip","path":""}
+ self.write_info_to_file(test_info)
+
+ def write_run_info(self):
+ path_str = self.name + "/report.json"
+ test_info = {"status":"run","path":path_str}
+ self.write_info_to_file(test_info)
+
+ def write_info_to_file(self, test_info):
+ time_stamp = os.getenv("TIME_STAMP")
+ test_list = "/var/run/agl-test/logs/tmp-log/test_list_" + time_stamp + ".json"
+ with open(test_list, 'r') as f:
+ test_suites = json.load(f)
+ f.close()
+ with open(test_list, 'w') as f:
+ test_suites[self.name] = test_info
+ json.dump(test_suites,f)
+ f.close()