From a68b93d6f305efbb1a924a5379290b35e6f37216 Mon Sep 17 00:00:00 2001 From: He Yin Ling Date: Tue, 15 May 2018 17:41:57 +0800 Subject: [PATCH] tiny-test-fw: show descriptive error when test case assignment fails: Will give hint when any job failed to assign: ``` Please add the following jobs to .gitlab-ci.yml with specific tags: * Add job with: psram, ESP32_IDF, UT_T1_1 * Add job with: psram, ESP32_IDF, UT_T1_1 ``` --- tools/tiny-test-fw/Utility/CIAssignTest.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/tiny-test-fw/Utility/CIAssignTest.py b/tools/tiny-test-fw/Utility/CIAssignTest.py index ca0204aaba..d4c5b723db 100644 --- a/tools/tiny-test-fw/Utility/CIAssignTest.py +++ b/tools/tiny-test-fw/Utility/CIAssignTest.py @@ -45,7 +45,7 @@ import json import yaml -from Utility import (CaseConfig, SearchCases, GitlabCIJob) +from Utility import (CaseConfig, SearchCases, GitlabCIJob, console_log) class Group(object): @@ -206,7 +206,11 @@ class AssignTest(object): break else: failed_to_assign.append(group) - assert not failed_to_assign + if failed_to_assign: + console_log("Please add the following jobs to .gitlab-ci.yml with specific tags:", "R") + for group in failed_to_assign: + console_log("* Add job with: " + ",".join(group.ci_job_match_keys), "R") + raise RuntimeError("Failed to assign test case to CI jobs") def output_configs(self, output_path): """ -- 2.40.0