Thomas Arendsen Hein
0b341ae9aa
run-test: revert most of 723925f3994b, timeout uses fallback for terminate()
2011-06-30 16:36:38 +02:00
Thomas Arendsen Hein
3453fd49fa
run-tests: fallback to SIGTERM if subprocess.Popen does not have terminate()
2011-06-30 16:25:05 +02:00
Idan Kamara
cf84c46249
run-tests: verbose log ignored test
2011-06-12 17:26:20 +03:00
Augie Fackler
6f67427a80
run-tests: allow whitelisting tests that should always run
...
It's desirable to run some tests all the time, for example
test-check-pyflakes.t and test-check-code-hg.py. This allows passing
--whitelist as a path to a file (flag can be specified more than once)
which contains a list of files to whitelist. Whitelisted tests are run
even if they're blacklisted or wouldn't match a --keyword test
run. For example, to do a quick test of usehttp2, one can now do
$ cat > test-whitelist <<EOF
> test-check-pyflakes.t
> test-check-code-hg.py
> EOF
$ (cd tests && ./run-tests.py --extra-config-opt 'ui.usehttp2=true'
> -k http -j 8 --whitelist test-whitelist)
and have all http-specific tests run as well as the two code linters.
2011-05-31 20:39:04 -05:00
Patrick Mezard
51439bc0e1
run-tests: fix --blacklist (broken by 098f69771978)
2011-05-28 11:44:27 +02:00
Idan Kamara
f4c2cac599
run-tests: fix --blacklist with jobs > 1
...
filter blacklisted tests before partitioning them
to the children.
maintains the 'Skipped...' output but not the 's'.
2011-05-27 17:46:48 +03:00
Idan Kamara
13676f41c0
run-tests: slightly simplify blacklist check
2011-05-27 17:46:47 +03:00
Thomas Arendsen Hein
843bd0fb63
run-tests: print a newline after all warnings
2011-05-18 15:45:57 +02:00
Patrick Mezard
f88224316a
run-tests: replace chdir() with Popen cwd option
2011-05-16 21:56:26 +02:00
Patrick Mezard
7f9abee9a9
run-tests: make --debug run in the temporary test directory
2011-05-16 21:54:43 +02:00
Patrick Mezard
7151b3e567
run-tests: use the common test path on Windows and Java
...
The alternate one did not run in the test directory and controlling
the jobs execution with threads instead of process made it harder
to fix.
2011-05-16 21:52:28 +02:00
Patrick Mezard
ee13516475
run-tests: ignore timeout when Popen.terminate is unavailable
...
Popen.terminate was introduced in python 2.6
2011-05-16 21:41:46 +02:00
Patrick Mezard
c7b66c8493
run-tests: fix hg.bat python reference
...
hg.bat expects to live in pythonxx/scripts and the python interpreter
to be in pythonxx. run-tests.py file layout is a little different and
python location must be fixed.
2011-05-16 21:26:50 +02:00
Patrick Mezard
954f0d5383
run-tests: fix python executable detection and copy on Windows
2011-05-16 21:24:14 +02:00
Martin Geisler
d899298b13
run-tests: remove check on --shell argument
...
No shell is needed when executing Python tests and finding a good
shell might be difficult/impossible on some platforms (e.g., Windows).
2011-05-09 17:20:15 +02:00
Idan Kamara
cc5617ae4e
run-tests: take the basepath when constructing the test temp dir
...
so it's possible to run tests that are outside the test/ dir
2011-05-07 21:01:15 +03:00
Idan Kamara
382db50197
run-tests: compare absolute paths in _checkhglib
2011-05-07 20:56:43 +03:00
Martin Geisler
4a2bc65e8a
run-tests: add --shell command line flag
...
This makes it easy to test with, say, both /bin/bash and /bin/dash
instead of changing the system-wide /bin/sh.
2011-05-05 20:04:49 +02:00
Martin Geisler
027d8985b0
run-tests: use type of default to convert environment variable
...
Before, defaults could only be integers, they can now also be strings,
floats and what have you.
2011-05-05 20:03:43 +02:00
Augie Fackler
c62bb34caf
run-tests.py: correctly handle list options with parallel tasks
2011-05-04 10:39:10 -05:00
Augie Fackler
3d09b5a236
run-tests: add flag to provide extra hgrc options for test runs
2011-05-01 08:00:25 -05:00
Idan Kamara
b6a9ab1966
run-tests: print a new line before writing the diff
2011-04-30 15:20:27 +03:00
Idan Kamara
56c14a6116
run-tests: don't count test as succeeded if it failed
...
regressed around 96f44260c0a0
2011-04-29 20:29:22 +03:00
Matt Mackall
390ca3b942
run-tests: do chdir for tests under a lock for thread safety
2011-04-25 17:01:34 -05:00
Matt Mackall
8e4d999508
run-tests: add iolock to vlog
2011-04-25 16:17:08 -05:00
Patrick Mezard
6be95e16f7
run-tests: display diff before prompting with --interactive
2011-04-25 18:42:31 +02:00
Matt Mackall
b173caf66d
run-tests: fix some missing i/o locks
2011-04-24 17:52:46 -05:00
Matt Mackall
ec6c0b4dd8
run-tests: add a lock for console I/O
2011-04-24 16:46:37 -05:00
Matt Mackall
ffa2bfc870
run-tests: switch timeout handling from alarm to helper thread
...
This should be slightly more portable than signals and be compatible
with threaded dispatch.
2011-04-24 16:42:15 -05:00
Matt Mackall
991f15b761
run-tests: add locking on results struct
2011-04-24 16:42:11 -05:00
Patrick Mezard
35a92ea64b
run-tests: fix --interactive (after 6f977fba3d04)
...
- Do not prompt if there is no .err file
- Fix source and target paths
2011-04-24 23:33:48 +02:00
Matt Mackall
15f893d8b4
run-tests: move test loop into a helper function
2011-04-22 14:04:34 -05:00
Matt Mackall
00e494b835
run-tests: use a results dict
2011-04-22 12:24:22 -05:00
Matt Mackall
1d9ec246c2
run-tests: move blacklist and retest filtering to runone
2011-04-22 11:36:40 -05:00
Matt Mackall
b8baa5e84b
run-tests: keep a list of passed tests
2011-04-22 11:32:05 -05:00
Matt Mackall
05c203e160
run-tests: move keyword checking into runone
2011-04-22 11:24:27 -05:00
Matt Mackall
2cd598eec8
run-tests: add ignores list
2011-04-22 11:22:02 -05:00
Matt Mackall
6f64de4f45
run-tests: move existence/name format check into runone
2011-04-21 18:38:30 -05:00
Matt Mackall
938b16055e
run-tests: move interactive handling into runone
2011-04-21 18:19:45 -05:00
Matt Mackall
a9372128fb
tests: better output on timeouts
...
Formerly, timeouts would generate huge scrollback-destroying diffs and
weird -15 return codes in the summary. Now we simply report "timed
out".
2011-04-09 15:52:19 -05:00
Idan Kamara
acaa24b982
tests: set HOME to the test temp dir (issue2707)
2011-03-25 22:15:37 +02:00
Patrick Mezard
a0c19fb892
run-tests: handle mixed comment lines in blacklists
2011-03-06 14:19:57 +01:00
Dan Villiom Podlaski Christiansen
ec590d5cd4
explicitly close files
...
Add missing calls to close() to many places where files are
opened. Relying on reference counting to catch them soon-ish is not
portable and fails in environments with a proper GC, such as PyPy.
2010-12-24 15:23:01 +01:00
Simon Heimberg
8b3f2a286a
run-tests: only call WIFEXITED on systems it exists
...
not on Windows or in jython
2011-02-02 23:21:13 +01:00
Simon Heimberg
eb39d33f61
run-tests: loadable as module
2011-02-01 20:47:05 +01:00
Martin Geisler
6a3d9310ab
code style: prefer 'is' and 'is not' tests with singletons
2010-11-22 18:15:58 +01:00
Nicolas Dumazet
7292968c6f
run-tests: fix --debug for .t tests
...
When --debug is given to the test runner, run() returns (retcode, None).
Do not try to use None output as a string, and return directly, similarly
as other testers.
2010-11-16 10:33:19 +09:00
Erik Zielke
fae4edd371
run-test: fixed wrong parenthesis
...
Fixed wrong placement of end parenthesis, from 8b0591f8d1cd
2010-11-08 10:56:47 +01:00
Mads Kiilerich
82954d10d1
tests: use (esc) markup for string-escape
...
This makes test output less ambiguous.
Failing test output will be escaped and marked up if necessary. A Python
string-escape compatible encoding is used, but not everything is encoded -
especially not \n and \t and '.
2010-11-08 01:35:41 +01:00
Mads Kiilerich
8c125f4b6b
tests: (no-eol) markup for command output without trailing LF
...
Output chunks without a trailing LF will now work but get (no-eol) appended.
This change mostly moves code around so we can handle that an output line
starts with data from previous command, followed by salt and the next command.
2010-11-08 01:35:40 +01:00