From f19ad59e7cea22923d327c81933093f0f5f1971d Mon Sep 17 00:00:00 2001 From: "Peter D. Barnes, Jr." Date: Tue, 2 Aug 2016 14:17:01 -0700 Subject: [PATCH] [test.py] Always run a single test suite specified with --suite= We normally don't run performance tests unless explicitly requested with "--constrain=performance", but this had the effect of ignoring a test suite given explicitly with "--suite=..." This patch runs a performance test without requiring an explicit performance constraint. --- test.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test.py b/test.py index 119dc520b..484ca266e 100755 --- a/test.py +++ b/test.py @@ -1262,6 +1262,10 @@ def run_tests(): # We can also use the --constrain option to provide an ordering of test # execution quite easily. # + + # Flag indicating a specific suite was explicitly requested + single_suite = False + if len(options.suite): # See if this is a valid test suite. path_cmd = os.path.join("utils", test_runner_name + " --print-test-name-list") @@ -1270,6 +1274,7 @@ def run_tests(): suites = suites.decode() if options.suite in suites.split('\n'): suites = options.suite + "\n" + single_suite = True else: print('The test suite was not run because an unknown test suite name was requested.', file=sys.stderr) sys.exit(2) @@ -1289,7 +1294,7 @@ def run_tests(): # indicated she wants to run or a list of test suites provided by # the test-runner possibly according to user provided constraints. # We go through the trouble of setting up the parallel execution - # even in the case of a single suite to avoid having two process the + # even in the case of a single suite to avoid having to process the # results in two different places. # if isinstance(suites, bytes): @@ -1299,8 +1304,9 @@ def run_tests(): # # Performance tests should only be run when they are requested, # i.e. they are not run by default in test.py. - # - if options.constrain != 'performance': + # If a specific suite was requested we run it, even if + # it is a performance test. + if not single_suite and options.constrain != 'performance': # Get a list of all of the performance tests. path_cmd = os.path.join("utils", test_runner_name + " --print-test-name-list --test-type=%s" % "performance")