Mercurial > public > mercurial-scm > hg-stable
diff tests/test-run-tests.t @ 35024:d600bda4a3e1
run-tests: allow automatic test discovery when providing folder as argument
Currently `run-tests.py` automatically discovers test only in the current
directory if no argument is provided. This patch makes it possible to pass a
number of tests and folders as arguments.
author | Matthieu Laneuville <matthieu.laneuville@octobus.net> |
---|---|
date | Thu, 19 Oct 2017 23:13:57 +0900 |
parents | a18eef03d879 |
children | 4fb489a998c9 |
line wrap: on
line diff
--- a/tests/test-run-tests.t Fri Nov 03 14:47:37 2017 +0100 +++ b/tests/test-run-tests.t Thu Oct 19 23:13:57 2017 +0900 @@ -1261,6 +1261,24 @@ . # Ran 1 tests, 0 skipped, 0 failed. +support for automatically discovering test if arg is a folder + $ mkdir tmp && cd tmp + + $ cat > test-uno.t << EOF + > $ echo line + > line + > EOF + + $ cp test-uno.t test-dos.t + $ cd .. + $ cp -R tmp tmpp + $ cp tmp/test-uno.t test-solo.t + + $ $PYTHON $TESTDIR/run-tests.py tmp/ test-solo.t tmpp + ..... + # Ran 5 tests, 0 skipped, 0 failed. + $ rm -rf tmp tmpp + support for running run-tests.py from another directory $ mkdir tmp && cd tmp $ cat > useful-file.sh << EOF