[TRTLLM-4886][infra]Try another timeout opt to exit test thread directly instead of gracefully (#4341)

* Try another timeout opt to kill test thread

Signed-off-by: qqiao <qqiao@nvidia.com>

* Return true when try to delete non-existing result file

Signed-off-by: qqiao <qqiao@nvidia.com>

* quick test for the result file

Signed-off-by: qqiao <qqiao@nvidia.com>

* Change back the global timeout setting

Signed-off-by: qqiao <qqiao@nvidia.com>

* Try to kill test in internal pytest

Signed-off-by: qqiao <qqiao@nvidia.com>

---------

Signed-off-by: qqiao <qqiao@nvidia.com>
This commit is contained in:
Emma Qiao 2025-05-16 17:56:40 +08:00 committed by GitHub
parent a6f2a1e918
commit 27bdd0c82d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -1013,6 +1013,7 @@ def runLLMTestlistOnPlatformImpl(pipeline, platform, testList, config=VANILLA_CO
extraInternalEnv,
"pytest",
"-v",
"--timeout-method=thread",
"--apply-test-list-correction",
"--splitting-algorithm least_duration",
"--timeout=${pytestTestTimeout}",
@ -1122,7 +1123,7 @@ def runLLMTestlistOnPlatform(pipeline, platform, testList, config=VANILLA_CONFIG
sh """
ls -all ${stageName}/
if ! grep -q '<testcase' ${stageName}/results.xml; then
rm ${stageName}/results.xml
rm ${stageName}/results.xml || true
fi
"""
def llmPath = sh (script: "realpath .", returnStdout: true).trim()

View File

@ -122,6 +122,7 @@ def test_unittests_v2(llm_root, llm_venv, case: str, output_dir):
ignore_opt,
"-v",
"--timeout=1600",
"--timeout-method=thread",
]
if dry_run: