diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -927,7 +927,6 @@ extraconfigopts=None, shell=None, hgcommand=None, - rhgcommand=None, slowtimeout=None, usechg=False, chgdebug=False, @@ -985,9 +984,6 @@ self._extraconfigopts = extraconfigopts or [] self._shell = _sys2bytes(shell) self._hgcommand = hgcommand or b'hg' - self._rhgcommand = rhgcommand or _sys2bytes( - os.path.abspath('./rust/target/release/rhg') - ) self._usechg = usechg self._chgdebug = chgdebug self._useipv6 = useipv6 @@ -1758,8 +1754,6 @@ script.append(b'set -x\n') if self._hgcommand != b'hg': script.append(b'alias hg="%s"\n' % self._hgcommand) - if self._rhgcommand != b'rhg': - script.append(b'alias rhg="%s"\n' % self._rhgcommand) if os.getenv('MSYSTEM'): script.append(b'alias pwd="pwd -W"\n') @@ -2956,7 +2950,6 @@ self._coveragefile = None self._createdfiles = [] self._hgcommand = None - self._rhgcommand = None self._hgpath = None self._portoffset = 0 self._ports = {} diff --git a/tests/test-rhg.t b/tests/test-rhg.t --- a/tests/test-rhg.t +++ b/tests/test-rhg.t @@ -1,3 +1,13 @@ +#require rust + + $ rhg() { + > if [ -f "$RUNTESTDIR/../rust/target/debug/rhg" ]; then + > "$RUNTESTDIR/../rust/target/debug/rhg" "$@" + > else + > echo "skipped: Cannot find rhg. Try to run cargo build in rust/rhg." + > exit 80 + > fi + > } $ rhg unimplemented-command [252] $ rhg root