Fix ptest runner for all test suites and refactor code
This MR does the following:
-
Add test suite cleanup and setup environment:
Add
setup_file()
,clean_test_environment()
andteardown_file()
inintegration-tests-common-funcs.sh
as a default functions to be executed for the following test suites:- optee-xtests
- parsec-simple-e2e-tests
- psa-arch-tests
This enables the above test suites to setup their environment before starting the first test run and teardown after the last test run in the suite
This patch also fixes issues when one of the previous test suites fails and the environment is not cleaned up for the next suite to run
Further, this enhances the test suites to be independent, which can setup, teardown, and cleanup of their environment
Note:
setup_file()
,teardown_file()
, andclean_test_environment()
can be overridden in each test suite even ifintegration-tests-common-funcs.sh
loaded up -
Refactor: Use the default cleanup function
Remove the override of
clean_test_environment()
from the following test suites to use the default fromintegration-tests-common-funcs.sh
* optee-xtests * parsec-simple-e2e-tests * psa-arch-tests -
Refactor user-accounts-integration-tests suite
Remove the override of
setup_file()
andclean_test_environment()
from the suite and use the default functions fromintegration-tests-common-funcs.sh
-
Refactor and use default test suite teardown environment
Remove
teardown_file()
usage from the following test suites: * container-engine-integration-tests * k3s-integration-tests * user-accounts-integration-testsThis enables them to use the default
teardown_file()
fromintegration-tests-common-funcs.sh
.