summaryrefslogtreecommitdiffstats
path: root/tests/aio_stress/run_tests.py
diff options
context:
space:
mode:
authorduerpei <duep.fnst@fujitsu.com>2023-03-08 13:48:03 +0800
committerduerpei <duep.fnst@fujitsu.com>2023-03-08 13:48:03 +0800
commit0124d938848301f8768d715b20dc1c4af486dd33 (patch)
tree70e8e75bf09e15fcdb05084f5c249fd0768fdcf5 /tests/aio_stress/run_tests.py
parent9648099248359cb00aa0c31d5436b537b0571853 (diff)
agl-test-framework: solve bugs in the test framework
Fixed problems: 1.When all the executed test suites are skipped, no new summary- report is generated. 2.When there is test suite successfully executed, the generated summary-report will contain the test suites which have logs in the "/tmp-log" directory, rather than just the test suites which has just executed. Correction method: 1.Move the function in "conftest.py" to "agl_test_report.py" and call it in the "agl-test" script to ensure that the function will be executed. 2.Set the timestamp to record the information of each executed test suite or skipped test suite to the file of "test_list_timestamp". And generate a summar-report according to the above file. Bug-AGL: SPEC-4345 Signed-off-by: duerpei <duep.fnst@fujitsu.com> Change-Id: I47bfd09706e37ce6bdc13f3f9f266bc62f74f777
Diffstat (limited to 'tests/aio_stress/run_tests.py')
-rw-r--r--tests/aio_stress/run_tests.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/aio_stress/run_tests.py b/tests/aio_stress/run_tests.py
index e7e8b5c..85a3515 100644
--- a/tests/aio_stress/run_tests.py
+++ b/tests/aio_stress/run_tests.py
@@ -39,6 +39,8 @@ def testbase():
instance = AIOBase()
#run test scripts
instance.run_test_fun()
+ #write test suite info to file
+ instance.write_run_info()
yield instance
@@ -50,7 +52,12 @@ def setup_module(testbase: AIOBase):
def precheck():
instance = AIOBase()
- return instance.precheck()
+ output = instance.precheck()
+ if(output == False):
+ #write test suite info to file
+ instance.write_skip_info()
+ return output
+
skip_msg = "The current environment does not match the test requirements."
pytestmark = pytest.mark.skipif(precheck() == False, reason = skip_msg)