mirror of
https://github.com/espressif/openthread.git
synced 2026-09-01 06:49:54 +00:00
[tests] add timeout to cert suite execution (#12379)
Currently, the `run_cert()` function in `run_cert_suite.py` invokes test scripts using `subprocess.check_call()` without a timeout. This can cause the test suite to hang indefinitely if a test script fails to terminate. This commit updates `run_cert_suite.py` to support a configurable `--timeout` argument. It passes this timeout to `check_call()` and handles `subprocess.TimeoutExpired` to log failure and print output upon timeout. Additionally, this commit updates `script/test` to pass the `TEST_TIMEOUT` environment variable to the test runner and updates GitHub workflow configurations to define specific timeout values for various test jobs.
This commit is contained in:
+1
-1
@@ -317,7 +317,7 @@ do_cert_suite()
|
||||
sudo modprobe ip6table_filter
|
||||
|
||||
mkdir -p ot_testing
|
||||
./tests/scripts/thread-cert/run_cert_suite.py --run-directory ot_testing --multiply "${MULTIPLY:-1}" "$@"
|
||||
./tests/scripts/thread-cert/run_cert_suite.py --run-directory ot_testing --multiply "${MULTIPLY:-1}" --timeout "${TEST_TIMEOUT:-0}" "$@"
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user