aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergio Martins <smartins@kde.org>2019-10-07 22:28:41 +0100
committerSergio Martins <smartins@kde.org>2019-10-07 22:28:41 +0100
commit44ea3bf4b4a9afbb51f5a0b715af6440a5bc1a7b (patch)
treed61fdca96aeeff2e81516cde985bfd8167806769
parenta7a0f2dbeacd347fbdd3460e6e246e249a693dff (diff)
tests: Add option to not run fixits
for debugging simpler cases
-rwxr-xr-xtests/run_tests.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/run_tests.py b/tests/run_tests.py
index 03fa503d..653048ee 100755
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -355,6 +355,7 @@ def compiler_name():
parser = argparse.ArgumentParser()
parser.add_argument("-v", "--verbose", action='store_true')
parser.add_argument("--no-standalone", action='store_true', help="Don\'t run clazy-standalone")
+parser.add_argument("--no-fixits", action='store_true', help='Don\'t run fixits')
parser.add_argument("--only-standalone", action='store_true', help='Only run clazy-standalone')
parser.add_argument("--dump-ast", action='store_true', help='Dump a unit-test AST to file')
parser.add_argument("--exclude", help='Comma separated list of checks to ignore')
@@ -372,6 +373,7 @@ _export_fixes_argument = "-Xclang -plugin-arg-clazy -Xclang export-fixes"
_dump_ast = args.dump_ast
_verbose = args.verbose
_no_standalone = args.no_standalone
+_no_fixits = args.no_fixits
_only_standalone = args.only_standalone
_num_threads = multiprocessing.cpu_count()
_lock = threading.Lock()
@@ -760,7 +762,7 @@ else:
for tests in list_of_chunks:
if not tests:
- continue;
+ continue
t = Thread(target=run_unit_tests, args=(tests,))
t.start()
@@ -769,7 +771,7 @@ else:
for thread in threads:
thread.join()
-if not run_fixit_tests(requested_checks):
+if not _no_fixits and not run_fixit_tests(requested_checks):
_was_successful = False
if _was_successful: