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]")
20 if sys.version_info.major < 3:
21 print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr)
22 print("Please use Python 3 instead", file=sys.stderr)
29 # get blacklist/whitelist
31 testlist = sys.argv[3].split(',')
32 testlist = [test.lower() for test in testlist]
33 if testlist[0].startswith('-'):
34 testlist[0] = testlist[0].lstrip('-')
35 test_blacklist = testlist
37 test_whitelist = testlist
39 cmdline = "%s -c f" % (sys.argv[1])
43 # how many workers to run tests with. FreeBSD doesn't support multiple primary
44 # processes, so make it 1, otherwise make it 4. ignored for non-parallel tests
45 n_processes = 1 if "bsd" in target else 4
47 runner = autotest_runner.AutotestRunner(cmdline, target, test_blacklist,
48 test_whitelist, n_processes)
50 runner.parallel_tests = autotest_data.parallel_test_list[:]
51 runner.non_parallel_tests = autotest_data.non_parallel_test_list[:]
53 num_fails = runner.run_all_tests()