##// END OF EJS Templates
run-tests: introduce a `HGTEST_REAL_HG` variable for test...
marmoute -
r48384:ee1fc8f9 default
parent child Browse files
Show More
@@ -3160,10 +3160,12 b' class TestRunner(object):'
3160 if WINDOWS and not self._hgcommand.endswith(b'.exe'):
3160 if WINDOWS and not self._hgcommand.endswith(b'.exe'):
3161 self._hgcommand += b'.exe'
3161 self._hgcommand += b'.exe'
3162
3162
3163 real_hg = os.path.join(self._bindir, self._hgcommand)
3164 osenvironb[b'HGTEST_REAL_HG'] = real_hg
3163 # set CHGHG, then replace "hg" command by "chg"
3165 # set CHGHG, then replace "hg" command by "chg"
3164 chgbindir = self._bindir
3166 chgbindir = self._bindir
3165 if self.options.chg or self.options.with_chg:
3167 if self.options.chg or self.options.with_chg:
3166 osenvironb[b'CHGHG'] = os.path.join(self._bindir, self._hgcommand)
3168 osenvironb[b'CHGHG'] = real_hg
3167 else:
3169 else:
3168 osenvironb.pop(b'CHGHG', None) # drop flag for hghave
3170 osenvironb.pop(b'CHGHG', None) # drop flag for hghave
3169 if self.options.chg:
3171 if self.options.chg:
@@ -3182,9 +3184,7 b' class TestRunner(object):'
3182 # `--config` but that disrupts tests that print command lines and check expected
3184 # `--config` but that disrupts tests that print command lines and check expected
3183 # output.
3185 # output.
3184 osenvironb[b'RHG_ON_UNSUPPORTED'] = b'fallback'
3186 osenvironb[b'RHG_ON_UNSUPPORTED'] = b'fallback'
3185 osenvironb[b'RHG_FALLBACK_EXECUTABLE'] = os.path.join(
3187 osenvironb[b'RHG_FALLBACK_EXECUTABLE'] = real_hg
3186 self._bindir, self._hgcommand
3187 )
3188 if self.options.rhg:
3188 if self.options.rhg:
3189 self._hgcommand = b'rhg'
3189 self._hgcommand = b'rhg'
3190 elif self.options.with_rhg:
3190 elif self.options.with_rhg:
@@ -22,7 +22,7 b' Testing hghave extensibility for third p'
22 > EOF
22 > EOF
23 $ ( \
23 $ ( \
24 > testrepohgenv; \
24 > testrepohgenv; \
25 > "$PYTHON" $TESTDIR/run-tests.py --with-hg=`which hg` -j 1 \
25 > "$PYTHON" $TESTDIR/run-tests.py --with-hg=$HGTEST_REAL_HG -j 1 \
26 > $HGTEST_RUN_TESTS_PURE test-hghaveaddon.t \
26 > $HGTEST_RUN_TESTS_PURE test-hghaveaddon.t \
27 > )
27 > )
28 running 1 tests using 1 parallel processes
28 running 1 tests using 1 parallel processes
@@ -15,7 +15,7 b' Define a helper to avoid the install ste'
15 =============
15 =============
16 $ rt()
16 $ rt()
17 > {
17 > {
18 > "$PYTHON" $TESTDIR/run-tests.py --with-hg=`which hg` -j1 "$@"
18 > "$PYTHON" $TESTDIR/run-tests.py --with-hg=$HGTEST_REAL_HG -j1 "$@"
19 > }
19 > }
20
20
21 error paths
21 error paths
@@ -1369,7 +1369,7 b' Test globbing of local IP addresses'
1369 Add support for external test formatter
1369 Add support for external test formatter
1370 =======================================
1370 =======================================
1371
1371
1372 $ CUSTOM_TEST_RESULT=basic_test_result "$PYTHON" $TESTDIR/run-tests.py --with-hg=`which hg` -j1 "$@" test-success.t test-failure.t
1372 $ CUSTOM_TEST_RESULT=basic_test_result "$PYTHON" $TESTDIR/run-tests.py --with-hg=$HGTEST_REAL_HG -j1 "$@" test-success.t test-failure.t
1373 running 2 tests using 1 parallel processes
1373 running 2 tests using 1 parallel processes
1374
1374
1375 # Ran 2 tests, 0 skipped, 0 failed.
1375 # Ran 2 tests, 0 skipped, 0 failed.
General Comments 0
You need to be logged in to leave comments. Login now