From 8c52f8cbf54634e880b96e4e9b0e54348de60440 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Tue, 28 Sep 2021 13:37:33 +0200 Subject: [PATCH] Rename command-option to generate_expected_output.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The --skip-benchlib option was misnamed: there are several benchlib tests, of which it only skipped the callgrind one. As there is no other test involving callgrind, rename to --skip-callgrind. Change-Id: I0179fd35dd79c525f79e4a28a626e964323409bf Reviewed-by: Ievgenii Meshcheriakov Reviewed-by: Thiago Macieira Reviewed-by: Tor Arne Vestbø --- tests/auto/testlib/selftests/generate_expected_output.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/auto/testlib/selftests/generate_expected_output.py b/tests/auto/testlib/selftests/generate_expected_output.py index 5695f03df9..fb62e3eaf3 100755 --- a/tests/auto/testlib/selftests/generate_expected_output.py +++ b/tests/auto/testlib/selftests/generate_expected_output.py @@ -194,7 +194,7 @@ class Scanner (object): def __init__(self): pass - def subdirs(self, given, skip_benchlib=False): + def subdirs(self, given, skip_callgrind=False): if given: for d in given: if not os.path.isdir(d): @@ -205,7 +205,7 @@ class Scanner (object): print(f'Directory {d} is not in the list of tests') else: tests = TESTS - if skip_benchlib: + if skip_callgrind: tests.remove('benchlibcallgrind') missing = 0 for d in tests: @@ -324,7 +324,7 @@ def main(argv): argument_parser = ArgumentParser(description=USAGE, formatter_class=RawTextHelpFormatter) argument_parser.add_argument('--formats', '-f', help='Comma-separated list of formats') - argument_parser.add_argument('--skip-benchlib', '-s', action='store_true', + argument_parser.add_argument('--skip-callgrind', '-s', action='store_true', help='Skip the expensive benchlib callgrind test') argument_parser.add_argument('subtests', help='subtests to regenerate', nargs='*', type=str) @@ -335,7 +335,7 @@ def main(argv): cleaner = Cleaner() src_dir = cleaner.sourceDir - tests = tuple(Scanner().subdirs(options.subtests, options.skip_benchlib)) + tests = tuple(Scanner().subdirs(options.subtests, options.skip_callgrind)) print("Generating", len(tests), "test results for", cleaner.version, "in:", src_dir) for path in tests: generateTestData(path, src_dir, cleaner.clean, formats)