2 # SPDX-License-Identifier: BSD-3-Clause
3 # Copyright(c) 2010-2014 Intel Corporation
5 # Script that uses either test app or qemu controlled by python-pexpect
12 print("Usage: autotest.py [test app|test iso image] ",
13 "[target] [allow|-block]")
24 # get blocklist/allowlist
26 testlist = sys.argv[3].split(',')
27 testlist = [test.lower() for test in testlist]
28 if testlist[0].startswith('-'):
29 testlist[0] = testlist[0].lstrip('-')
30 test_blocklist = testlist
32 test_allowlist = testlist
34 cmdline = "%s -c f" % (sys.argv[1])
38 # how many workers to run tests with. FreeBSD doesn't support multiple primary
39 # processes, so make it 1, otherwise make it 4. ignored for non-parallel tests
40 n_processes = 1 if "bsd" in target else 4
42 runner = autotest_runner.AutotestRunner(cmdline, target, test_blocklist,
43 test_allowlist, n_processes)
45 runner.parallel_tests = autotest_data.parallel_test_list[:]
46 runner.non_parallel_tests = autotest_data.non_parallel_test_list[:]
48 num_fails = runner.run_all_tests()