2626parser .add_argument ("-c" , "--clean-all" , dest = "clean" , action = "store_true" ,
2727 help = "Run make clean before building test" )
2828
29- parser .add_argument ("-s" , "--skip" , nargs = "*" , dest = "skip" ,
29+ parser .add_argument ("-s" , "--skip" , nargs = "*" , dest = "skip" , default = [],
3030 help = "Tests to skip. Valid names: 'unit' (all unit tests), \
3131 'stress' (stresstest), 'integration' (all integration tests), examples \
3232 or the name of a single integration test folder (leaf node name, e.g. 'udp') " )
3333
34- parser .add_argument ("-t" , "--tests" , nargs = "*" , dest = "tests" ,
34+ parser .add_argument ("-t" , "--tests" , nargs = "*" , dest = "tests" , default = [],
3535 help = "Tests to do. Valid names: see '--skip' " )
3636
3737parser .add_argument ("-f" , "--fail-early" , dest = "fail" , action = "store_true" ,
@@ -45,11 +45,8 @@ def print_skipped(name, reason):
4545 print pretty .WARNING ("* Skipping " + name )
4646 print " Reason: {0:40}" .format (reason )
4747
48- def valid_tests ():
48+ def valid_tests (subfolder = None ):
4949 """Returns a list of all the valid integration tests in */integration/*"""
50- if not args .skip :
51- args .skip = []
52-
5350 if "integration" in args .skip :
5451 return []
5552
@@ -219,10 +216,18 @@ def main():
219216
220217
221218 test_categories = ["integration" , "examples" , "unit" , "stress" ]
219+ if "integration" not in args .tests :
220+ test_folders = ["fs" , "hw" , "kernel" , "net" , "platform" , "stl" , "util" ]
221+ else :
222+ test_folders = []
223+ tests_combined = test_categories + test_folders
222224 if args .tests :
223- test_categories = [x for x in test_categories if x in args .tests or x == "integration" ]
225+ test_categories = [x for x in tests_combined if x in args .tests ]
224226 if args .skip :
225- test_categories = [x for x in test_categories if not x in args .skip ]
227+ test_categories = [x for x in tests_combined if not x in args .skip ]
228+
229+ print test_categories
230+ print valid_tests ()
226231
227232 integration = integration_tests () if "integration" in test_categories else 0
228233 stress = stress_test () if "stress" in test_categories else 0
0 commit comments