# HG changeset patch # User Christian Ebert # Date 1395477847 0 # Node ID a5dabff2e764df3af1d50c1feac5a4c350bd4bac # Parent e7fa36b2bd235acfca188ce53ab100ed3649c25e# Parent 1d3aa8779efb211ffaa9095349e242f1269878f9 Merge with stable diff -r e7fa36b2bd23 -r a5dabff2e764 tests/run-tests.py --- a/tests/run-tests.py Thu Mar 20 01:02:04 2014 +0000 +++ b/tests/run-tests.py Sat Mar 22 08:44:07 2014 +0000 @@ -141,6 +141,8 @@ help="skip tests listed in the specified blacklist file") parser.add_option("--whitelist", action="append", help="always run tests listed in the specified whitelist file") + parser.add_option("--changed", type="string", + help="run tests that are changed in parent rev or working directory") parser.add_option("-C", "--annotate", action="store_true", help="output files annotated with coverage") parser.add_option("-c", "--cover", action="store_true", @@ -1181,7 +1183,13 @@ checktools() if not args: - args = os.listdir(".") + if options.changed: + proc = Popen4('hg st --rev "%s" -man0 .' % options.changed, + None, 0) + stdout, stderr = proc.communicate() + args = stdout.strip('\0').split('\0') + else: + args = os.listdir(".") tests = [t for t in args if t.startswith("test-")