Mercurial > public > mercurial-scm > hg-stable
diff tests/test-run-tests.t @ 28037:54c896f8bb79
run-tests: warn about symlinks to non hg scripts
If you symlink /usr/bin/true to /something/hg and try to run
--with-hg=/something/hg, run-tests will end up running /usr/bin/hg,
not /usr/bin/true.
author | timeless <timeless@mozdev.org> |
---|---|
date | Mon, 08 Feb 2016 22:50:19 +0000 |
parents | 0de4dfc9af0c |
children | 562a073a2a1b |
line wrap: on
line diff
--- a/tests/test-run-tests.t Mon Feb 08 18:29:17 2016 +0900 +++ b/tests/test-run-tests.t Mon Feb 08 22:50:19 2016 +0000 @@ -21,6 +21,27 @@ > run-tests.py --with-hg=`which hg` "$@" > } +error paths + +#if symlink + $ ln -s `which true` hg + $ run-tests.py --with-hg=./hg + warning: --with-hg should specify an hg script + + # Ran 0 tests, 0 skipped, 0 warned, 0 failed. + $ rm hg +#endif + +#if execbit + $ touch hg + $ run-tests.py --with-hg=./hg + Usage: run-tests.py [options] [tests] + + run-tests.py: error: --with-hg must specify an executable hg script + [2] + $ rm hg +#endif + a succesful test =======================