Skip to content

Fix ptest runner for all test suites and refactor code (main)

This MR does the following:

  • Add test suite cleanup and setup environment:

    Add setup_file(), clean_test_environment() and teardown_file() in integration-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(), and clean_test_environment() can be overridden in each test suite even if integration-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 from integration-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() and clean_test_environment() from the suite and use the default functions from integration-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-tests

    This enables them to use the default teardown_file() from integration-tests-common-funcs.sh.

Edited by Vikas Katariya

Merge request reports