File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -51,12 +51,22 @@ def retrieve_test_list(config_file=f"{PARENT_DIR}/.buildkite/test_description.js
5151 default = False ,
5252 help = "List available tests" ,
5353 )
54+ parser .add_argument (
55+ "tests" ,
56+ nargs = "*" ,
57+ help = "The tests to run. If none are specified run all the available tests." ,
58+ )
5459 args = parser .parse_args ()
5560
5661 test_config = retrieve_test_list ()
5762
5863 for test in test_config ["tests" ]:
5964 name = test ["test_name" ]
65+
66+ if len (args .tests ) > 0 :
67+ if name not in args .tests :
68+ continue
69+
6070 command = test ["command" ]
6171 command = command .replace ("{target_platform}" , platform .machine ())
6272 if args .list_tests :
@@ -66,4 +76,5 @@ def retrieve_test_list(config_file=f"{PARENT_DIR}/.buildkite/test_description.js
6676 setattr (TestsContainer , f"test_{ name } " , test_func )
6777
6878 if not args .list_tests :
69- unittest .main (verbosity = 2 )
79+ tests_suite = unittest .TestLoader ().loadTestsFromTestCase (TestsContainer )
80+ unittest .TextTestRunner (verbosity = 2 ).run (tests_suite )
You can’t perform that action at this time.
0 commit comments