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
6 from __future__ import print_function
13 print("Usage: autotest.py [test app|test iso image] ",
14 "[target] [whitelist|-blacklist]")
25 # get blacklist/whitelist
27 testlist = sys.argv[3].split(',')
28 testlist = [test.lower() for test in testlist]
29 if testlist[0].startswith('-'):
30 testlist[0] = testlist[0].lstrip('-')
31 test_blacklist = testlist
33 test_whitelist = testlist
35 cmdline = "%s -c f -n 4" % (sys.argv[1])
39 # how many workers to run tests with. FreeBSD doesn't support multiple primary
40 # processes, so make it 1, otherwise make it 4. ignored for non-parallel tests
41 n_processes = 1 if "bsdapp" in target else 4
43 runner = autotest_runner.AutotestRunner(cmdline, target, test_blacklist,
44 test_whitelist, n_processes)
46 runner.parallel_tests = autotest_data.parallel_test_list[:]
47 runner.non_parallel_tests = autotest_data.non_parallel_test_list[:]
49 num_fails = runner.run_all_tests()