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
51
51
default = False ,
52
52
help = "List available tests" ,
53
53
)
54
+ parser .add_argument (
55
+ "tests" ,
56
+ nargs = "*" ,
57
+ help = "The tests to run. If none are specified run all the available tests." ,
58
+ )
54
59
args = parser .parse_args ()
55
60
56
61
test_config = retrieve_test_list ()
57
62
58
63
for test in test_config ["tests" ]:
59
64
name = test ["test_name" ]
65
+
66
+ if len (args .tests ) > 0 :
67
+ if name not in args .tests :
68
+ continue
69
+
60
70
command = test ["command" ]
61
71
command = command .replace ("{target_platform}" , platform .machine ())
62
72
if args .list_tests :
@@ -66,4 +76,5 @@ def retrieve_test_list(config_file=f"{PARENT_DIR}/.buildkite/test_description.js
66
76
setattr (TestsContainer , f"test_{ name } " , test_func )
67
77
68
78
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