changeset 29583:6ce870dba6fa

run-tests: make --local set --with-chg if --chg is used --local should work with chg as well.
author Jun Wu <quark@fb.com>
date Mon, 18 Jul 2016 08:55:30 +0100
parents ee96d95e81a4
children 06587edd1233
files tests/run-tests.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Mon Jul 18 08:45:46 2016 +0100
+++ b/tests/run-tests.py	Mon Jul 18 08:55:30 2016 +0100
@@ -214,7 +214,8 @@
     parser.add_option("-k", "--keywords",
         help="run tests matching keywords")
     parser.add_option("-l", "--local", action="store_true",
-        help="shortcut for --with-hg=<testdir>/../hg")
+        help="shortcut for --with-hg=<testdir>/../hg, "
+             "and --with-chg=<testdir>/../contrib/chg/chg if --chg is set")
     parser.add_option("--loop", action="store_true",
         help="loop tests repeatedly")
     parser.add_option("--runs-per-test", type="int", dest="runs_per_test",
@@ -310,6 +311,8 @@
         testdir = os.path.dirname(_bytespath(canonpath(sys.argv[0])))
         reporootdir = os.path.dirname(testdir)
         pathandattrs = [(b'hg', 'with_hg')]
+        if options.chg:
+            pathandattrs.append((b'contrib/chg/chg', 'with_chg'))
         for relpath, attr in pathandattrs:
             binpath = os.path.join(reporootdir, relpath)
             if os.name != 'nt' and not os.access(binpath, os.X_OK):