]> granicus.if.org Git - esp-idf/commitdiff
tiny-test-fw: show descriptive error when test case assignment fails:
authorHe Yin Ling <heyinling@espressif.com>
Tue, 15 May 2018 09:41:57 +0000 (17:41 +0800)
committerbot <bot@espressif.com>
Thu, 24 May 2018 03:40:03 +0000 (03:40 +0000)
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

index ca0204aabac4937effd4b089f0741ce6fae149db..d4c5b723db4f0ed9d1d4fd9975705a3d271c5532 100644 (file)
@@ -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):
         """