Commit Graph

152 Commits

Author SHA1 Message Date
Matt Mackall
0beeabc59e run-tests: add -l short option for --local 2010-04-29 18:25:45 -05:00
Benoit Boissinot
443d0248ba merge with stable 2010-04-15 20:25:26 +02:00
Benoit Boissinot
d2fd3d1bf8 run-tests.py: can't remove from os.environ on solaris 2010-04-15 20:25:07 +02:00
Benoit Boissinot
02bda9ab1a merge with stable 2010-04-14 11:27:15 +02:00
Ry4an Brase
24ead01860 Fix --blacklist when --jobs > 1 in run_tests.py.
The options parsing logic replaces the options.blacklist initial value,
a list of filenames, with a dict of test names to filenames.  When
runchildren rebuilds the command line to launch child processes the dict
is flattened and provided as a malformed argument when a filename is
expected.

Fix is to remove the blacklist option from child invocations since the
filtering is handled in the parent anyway.
2010-04-14 00:24:47 -05:00
Benoit Boissinot
4ae674da0c run-tests.py: reset env variables set by hooks 2010-04-14 09:08:47 +02:00
Nicolas Dumazet
7f1a963829 pylint, pyflakes: remove unused or duplicate imports 2010-04-14 17:58:10 +09:00
Benoit Boissinot
18b2a0f2b6 merge with stable 2010-04-14 09:09:43 +02:00
Ronny Pfannschmidt
1bc07ba5f1 run-tests: force to test pure on pypy as well 2010-03-23 15:23:04 +01:00
Ronny Pfannschmidt
344c277e33 Fix run-tests.py -jX after c0b2d15b7cd0 2010-03-23 15:22:17 +01:00
Ronny Pfannschmidt
bc5eda7fb9 tests: adapt the test runner to work with jython 2010-03-23 11:37:31 +01:00
Brodie Rao
b47433e334 run-tests: make sure GREP_OPTIONS isn't set
This can interfere with test output, especially for options like --color.
2010-03-22 01:36:12 -04:00
Dirkjan Ochtman
0fd3b50af0 tests: use external coverage, mandate newer version
This removes the option for including the stdlib in coverage reports.
2010-03-11 15:32:24 +01:00
Matt Mackall
a2acbc421b fix up a bunch of check-code warnings 2010-02-09 14:12:22 -06:00
Mads Kiilerich
487f13afcd run-tests.py: skipped tests shouldn't change working directory 2010-02-09 01:12:29 +01:00
Brendan Cully
af14f4f0ed run-tests: kill daemons on ^C with -j.
This is not perfect, but the problem is fundamentally racy.
2010-02-06 15:18:36 +01:00
Nicolas Dumazet
f6e8bdddc7 run-tests: split tests/blacklist in tests/blacklists/*
Following discussions with Gilles Morris [1], it seems that it is preferable to
use several blacklist files in a blacklists/ directory. It is easier to add an
unversioned file for experiments than modifying a tracked file.

Also fall back to a simpler syntax, giving up ConfigParser, now that section
names are not needed anymore.

And allow --blacklist parameter to be a complete path, instead of only one
of the filenames contained in tests/blacklists/


[1] http://www.selenic.com/pipermail/mercurial-devel/2009-December/017317.html
2009-12-10 17:21:31 +09:00
Matt Mackall
8d99be19f0 many, many trivial check-code fixups 2010-01-25 00:05:27 -06:00
Matt Mackall
cd3ef170f7 Merge with stable 2010-01-19 22:45:09 -06:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Wagner Bruna
1f5640533e run-tests.py: clears http_proxy for all tests 2009-12-29 19:02:26 -02:00
Matt Mackall
de8a538d3a Merge stable heads 2009-11-25 21:54:18 -06:00
Wagner Bruna
8fc5f3b74f run-tests: LANGUAGE may make tests fail 2009-11-24 13:55:13 -02:00
Benoit Boissinot
61f5eea9d1 run-tests: always set $COLUMNS, fix running tests under emacs shell
fix tests failure reported by Neal Becker.
2009-11-23 22:45:36 +01:00
Greg Ward
939861b0bd run-tests: give each child its own tmp dir (issue1911)
Fixes bug introduced by 40ac669fd6c2 (issue1911: --tmpdir plus parallel
mode = fail), and also fixes the long-standing quirk that parallel mode
created multiple /tmp/hgtests.XXXXXX directories.  Now there is only one
/tmp/hgtests.XXXXXX, with child0, child1, etc. under it.
2009-11-18 22:23:11 -05:00
Greg Ward
8ce4dc3093 run-tests: add "debug" mode: don't capture child output, just show it.
In debug mode, we:
- don't try to diff expected vs actual output
- disallow --interactive
- disable timeouts (warn if user tried to supply one)
- don't try to parse hghave output, since we don't have the output
- don't try to save output to .err file
2009-11-02 17:06:11 -05:00
Greg Ward
000c454c9a run-tests: make --tmpdir option more useful.
- instead of creating HGTMP inside tmpdir, now HGTMP is tmpdir
  (thus, fail if tmpdir already exists)
- passing --tmpdir automatically turns on --keep-tmpdir
2009-11-02 17:06:10 -05:00
Matt Mackall
7d81f1588d tests: add -k to test scripts matching keywords
argument is a space-separated list of keywords that are searched for
in the name and body of each test. This makes it easy to run only
tests related to tags, hgweb, revert, etc. (eg -k "tag hgweb revert").
2009-10-12 14:52:53 -05:00
Matt Mackall
ba7d982f34 run-tests: add --noskips option 2009-10-11 13:58:53 -05:00
Martin Geisler
3fd04b36b0 run-tests: standardize on --foo instead of -f/--foo
We write -f/--foo in Mercurial help texts (docstrings), but I think it
looks strange in error messages.
2009-08-28 20:53:03 +02:00
Martin Geisler
bfa92eb996 run-tests: use parser.error for cmdline option errors 2009-08-28 20:50:54 +02:00
Nicolas Dumazet
857382a916 run-tests: expand --tmpdir and create it if needed 2009-08-15 21:19:57 +09:00
Alejandro Santos
77d606ac51 compat: use open() instead of file() everywhere 2009-07-05 11:01:30 +02:00
Alejandro Santos
c0dcbaabfe tests: add -3 switch to run-tests.py 2009-07-05 10:59:54 +02:00
Greg Ward
e0eb715075 run-tests: use os.path.realpath() to find hg's setup.py.
Needed for running out-of-tree test suites without --with-hg/--local.
2009-06-23 22:20:54 -04:00
Dirkjan Ochtman
605b944edf kill trailing whitespace 2009-06-19 13:47:50 +02:00
Brendan Cully
167122c387 Unbreak run-tests support for out-of-tree extensions 2009-06-06 15:38:03 -07:00
Dirkjan Ochtman
5912c48b40 tests: delete parallel coverage files after combining 2009-06-03 14:10:36 +02:00
Greg Ward
e8d6180038 run-tests: don't replace PYTHONPATH, just augment it.
(Needed at least for Subversion bindings on OS X, which are in
/opt/subversion.  Useful for other external libraries installed in
non-standard places too.)
2009-06-01 09:18:35 -04:00
Greg Ward
3dc47b69c7 run-tests: redefine --with-hg so it takes the 'hg' script to run.
- in parseargs(), check that --with-hg value is valid
- add handy --local option for "--with-hg=../hg"
- ensure that we always set PATH and PYTHONPATH (not just
  when doing a temporary install)
- override any existing PYTHONPATH, so test success does not
  depend on whatever happens to be in the caller's environment
- give tests a little more control by exporting $PYTHON to the
  environment; needed by test-convert and test-mergetool when
  they run hg with a stripped-down $PATH

Also, add a big comment explaining all the corner cases to test for the
next person who tries to modify this script.
2009-05-31 15:20:31 -04:00
Greg Ward
2cb745bb8b run-tests: fix _checkhglib() so it's correct when using --with-hg.
Since this makes the warning less likely, upgrade it to a "real"
warning to stderr.
2009-05-29 22:18:16 -04:00
Greg Ward
47093c6314 run-tests: factor out _checkhglib() to check import path of 'mercurial'.
- rename _hgpath() to _gethgpath() and move it down next to _checkhglib()
- change _gethgpath() so it caches its result: replaces global 'hgpkg'
  that anyone can use with global '_hgpath' that is only for _gethgpath()
- no need to pass 'expecthg' to runchildren() or runtests() anymore

Also: do not change global PYTHON when doing coverage; this seems to
be unnecessary, since we create a dummy 'hg' script that handles
coverage for us, and it made things brittle.  (E.g. the rest of this
patch makes the call to _hgpath() come later, and it was broken by
enabling coverage.)
2009-05-29 22:18:15 -04:00
Greg Ward
3c6e4e3061 run-tests: show PID if running in parallel mode with -v.
(Extremely handy when you break parallel operation and need to figure
out what's going on.  The assumption is that if you run with -v, you
want more details.)
2009-05-29 22:17:53 -04:00
Greg Ward
4ad6973308 run-tests: clarify timeout log message. 2009-05-29 10:00:03 -04:00
Dirkjan Ochtman
f9911763f7 tests: make coverage run in parallel mode, clean up coverage code 2009-05-25 18:34:35 +02:00
Simon Heimberg
293c5101a0 runtest: do not start testing when there is no test 2009-05-19 09:36:20 +02:00
Matt Mackall
ea0baf43e7 Merge with stable 2009-12-29 16:16:25 -06:00
Mads Kiilerich
8c4a04a32f run-tests.py: Show paths to failing tests, .err and .out
I think this is very convenient when investigating and fixing test failures,
but perhaps it must be tweaked further to show paths if and only if
it is appropriate.
2009-12-16 12:09:25 +01:00
Martin Geisler
8222ff8d65 run-tests: backout 255e2d0db0a0
We no longer have any data files, so this is no longer needed. Augie
Fackler reported on IRC that this "hack" had never worked for him in
the first place.
2009-12-10 22:31:10 +01:00
Martin Geisler
18e6420547 run-tests: install data files correctly
In 47cfa8aa4b94 we began installing some data files in PREFIX/share.
When preparing to run the tests, run-tests.py uses --home="" in order
to work around home being set in a ~/.pydistutils.cfg file. This
somehow overwrites the --prefix option.

The result was that the share/ directory was installed in the top of
the Mercurial source tree.
2009-12-05 23:16:09 +01:00