From ed5e05a15d3a8bea3a4f428d1664c9c5077866c2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 1 Oct 2010 22:07:04 -0700 Subject: bisect: more bisection options and fixes for the old ones Autobuild-User: Andrew Tridgell Autobuild-Date: Sat Oct 2 06:14:46 UTC 2010 on sn-devel-104 --- script/bisect-test.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'script') diff --git a/script/bisect-test.py b/script/bisect-test.py index 843c80dccf..e5f91b02f1 100755 --- a/script/bisect-test.py +++ b/script/bisect-test.py @@ -9,10 +9,12 @@ import os, tempfile, sys from optparse import OptionParser parser = OptionParser() -parser.add_option("", "--tests", help="list of tests to run", default='') -parser.add_option("", "--good", help="known good revision (default HEAD)", default='HEAD') -parser.add_option("", "--bad", help="known bad revision (default HEAD~100)", default='HEAD~100') -parser.add_option("", "--skip-build-errors", help="skip revision where make fails", default=False) +parser.add_option("", "--tests", help="list of tests to run", default='*') +parser.add_option("", "--quick", help="use make quicktest", default='') +parser.add_option("", "--good", help="known good revision (default HEAD~100)", default='HEAD~100') +parser.add_option("", "--bad", help="known bad revision (default HEAD)", default='HEAD') +parser.add_option("", "--skip-build-errors", help="skip revision where make fails", + action='store_true', default=False) parser.add_option("", "--autogen", help="run autogen before each build",action="store_true", default=False) parser.add_option("", "--configure", help="run configure.developer before each build", action="store_true", default=False) @@ -59,7 +61,11 @@ if opts.skip_build_errors: f.write("make -j %u || exit 125\n" % opts.N) else: f.write("make -j %u || exit 1\n" % opts.N) -f.write("make -j %u test TESTS='%s' FAIL_IMMEDIATELY=1 || exit 1\n" % (opts.N, opts.tests)) +if opts.quick: + target="quicktest" +else: + target="test" +f.write("make -j %u %s TESTS='%s' FAIL_IMMEDIATELY=1 || exit 1\n" % (opts.N, target, opts.tests)) f.write("exit 0\n") f.close() @@ -72,7 +78,7 @@ def cleanup(): ret = -1 try: run_cmd("git bisect reset", dir=gitroot, show=False, checkfail=False) - run_cmd("git bisect start %s %s --" % (opts.good, opts.bad), dir=gitroot) + run_cmd("git bisect start %s %s --" % (opts.bad, opts.good), dir=gitroot) ret = run_cmd("git bisect run bash %s" % f.name, dir=gitroot, show=True, checkfail=False) except KeyboardInterrupt: print("Cleaning up") -- cgit