From a466db25605b7c1d0c981da42f27361bd1e5baa2 Mon Sep 17 00:00:00 2001 From: Jacob Boddey Date: Sun, 2 Feb 2025 14:45:17 +0000 Subject: [PATCH 1/3] WIP: Set test description for module timeout --- .github/workflows/testing.yml | 4 ---- framework/python/src/test_orc/test_orchestrator.py | 12 ++++++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 9ba417f9f..4e78f18b5 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -69,10 +69,6 @@ jobs: - name: Install Testrun shell: bash {0} run: cmd/install -l - - name: Build Testrun - shell: bash {0} - run: cmd/build - timeout-minutes: 10 - name: Run tests for conn module shell: bash {0} run: bash testing/unit/run_test_module.sh conn captures ethtool output diff --git a/framework/python/src/test_orc/test_orchestrator.py b/framework/python/src/test_orc/test_orchestrator.py index 550ff3b39..af608c034 100644 --- a/framework/python/src/test_orc/test_orchestrator.py +++ b/framework/python/src/test_orc/test_orchestrator.py @@ -531,6 +531,18 @@ def _run_test_module(self, module): if time.time() > test_module_timeout: LOGGER.error("Module timeout exceeded, killing module: " + module.name) module.stop(kill=True) + + # Update the test description for the tests + for test in module.tests: + + # Copy the test so we don't alter the source + test_copy = copy.deepcopy(test) + + # Update test + test_copy.result = TestResult.ERROR + test_copy.description = "Module timeout exceeded. Try increasing the timeout." + self.get_session().add_test_result(test_copy) + break # Save all container logs to file From 74b1e0d5f537bcdd61f8b820328d4987980e2041 Mon Sep 17 00:00:00 2001 From: Jacob Boddey Date: Mon, 3 Feb 2025 09:27:08 +0000 Subject: [PATCH 2/3] Fix pylint issue --- framework/python/src/test_orc/test_orchestrator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/python/src/test_orc/test_orchestrator.py b/framework/python/src/test_orc/test_orchestrator.py index af608c034..5cec20fb5 100644 --- a/framework/python/src/test_orc/test_orchestrator.py +++ b/framework/python/src/test_orc/test_orchestrator.py @@ -540,7 +540,9 @@ def _run_test_module(self, module): # Update test test_copy.result = TestResult.ERROR - test_copy.description = "Module timeout exceeded. Try increasing the timeout." + test_copy.description = ( + "Module timeout exceeded. Try increasing the timeout." + ) self.get_session().add_test_result(test_copy) break From 16c20efe22d7a2599326d4bd11379064f9b32697 Mon Sep 17 00:00:00 2001 From: Jacob Boddey Date: Mon, 3 Feb 2025 10:09:42 +0000 Subject: [PATCH 3/3] Update description --- framework/python/src/test_orc/test_orchestrator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/python/src/test_orc/test_orchestrator.py b/framework/python/src/test_orc/test_orchestrator.py index 5cec20fb5..d28326cbc 100644 --- a/framework/python/src/test_orc/test_orchestrator.py +++ b/framework/python/src/test_orc/test_orchestrator.py @@ -541,7 +541,7 @@ def _run_test_module(self, module): # Update test test_copy.result = TestResult.ERROR test_copy.description = ( - "Module timeout exceeded. Try increasing the timeout." + "Module timeout exceeded. Try increasing the timeout value." ) self.get_session().add_test_result(test_copy)