Commit Graph

106 Commits

Author SHA1 Message Date
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
fa65ae0679 remove deprecated rawcommit 2009-05-14 13:20:40 -05:00
Martin Geisler
11190d5aaa util: always use subprocess 2009-05-02 23:05:35 +02:00
Bryan O'Sullivan
092a707d59 run-tests.py: ensure that hgpkg is always visible 2009-04-24 14:40:56 -07:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Simon Heimberg
36693ceb6a run-tests: cosmetics 2009-04-22 15:49:33 +02:00
Simon Heimberg
e9ecbcc326 run-tests: fix error when timeout occurs 2009-04-22 09:11:46 +02:00
Benoit Boissinot
3da3b1d1e0 run-tests: fix -jN broken by eb47f6866e97 2009-04-22 01:53:15 +02:00
Martin Geisler
f3f344d0c5 run-tests: removed some underscores (coding style) 2009-04-21 11:19:10 +02:00
Martin Geisler
6f1fe4b8fc run-tests: upper-case global PYTHON variable 2009-04-21 10:53:42 +02:00
Greg Ward
7b736bed65 run-tests: reduce global variables set by parse_args(). 2009-04-20 21:50:11 -04:00
Greg Ward
e0391753e2 run-tests: factor out main(); reduce use of globals a bit. 2009-04-20 21:42:20 -04:00
Greg Ward
2f2a34c5e7 run-tests: move bits of main program so it's all at the bottom. 2009-04-20 21:10:39 -04:00
Greg Ward
5de1444cff run-tests: move _hgpath() up so it's not in the middle of the main program. 2009-04-20 21:07:05 -04:00
Greg Ward
0f9eca8100 run-tests: factor out parse_args(). Clarify use of globals a bit. 2009-04-20 21:04:24 -04:00
Nicolas Dumazet
36eacb3699 run-tests: detect when hghave fails to check for a feature and fail test
hghave exitcode != 0 might mean that hghave failed to check for feature
avaibility. Detect those cases, and fail the test, instead of skipping it.
2009-04-08 02:38:23 +09:00
Mads Kiilerich
2694fdc1a4 run-tests.py: avoid using popen2.Popen4 - use subprocess instead
Use subprocess to emulate Popen4 if available - similar to how it is done in
util.py.

Using popen2 under python 2.6 gives
DeprecationWarning: The popen2 module is deprecated.  Use the subprocess module.
2009-02-27 19:10:38 +01:00
Frank Wierzbicki
975c4301af tests: use same popen strategy for jython as for nt 2009-02-18 13:19:30 +01:00
Mads Kiilerich
d6ab2f95b5 test-merge-tool: Make sure no hgmerge can be found in $PATH
The merge tool selecting algorithm is hardcoded to look for hgmerge in $PATH
before it falls back to use internal merge. This fixes the test for this
fallback to be tolerant to existing hgmerges.
2009-02-10 22:47:38 +01:00
Jim Correia
652c76f46a Account for symlinks when setting up HGTMP.
On Mac OS X, several top-level directories are actually symlinks into
/private. When setting up HGTMP, expand the symlinks so that later
comparisons to or substituations with the actual path work as expected.
2009-01-25 14:12:41 -05:00
Martin Geisler
8fdb89c045 run-tests: add --pure flag for using pure Python modules 2009-01-31 22:50:18 +01:00
Matt Mackall
003766b33a tests: fix no-diffs option 2008-12-19 16:48:32 -06:00
Thomas Arendsen Hein
94a7bf7e03 Fix non-empty $CDPATH causing failed tests.
If CDPATH contains '.', every cd command prints the target path,
which causes additional output in tests and makes them fail.
2008-12-01 12:11:28 +01:00
Matt Mackall
0edb7d6fe4 run-tests: allow turning off diff display 2008-11-07 16:28:52 -06:00
Matt Mackall
3c69f4c760 run-tests: --interactive overrides -j 2008-10-22 17:34:37 -05:00
Thomas Arendsen Hein
d6b1ca4cb9 Use dummy diffstat in tests and remove older diffstat workaround.
This makes test-notify pass on systems without diffstat installed
or where the diffstat version yields a different output.
2008-10-19 19:03:23 +02:00
Benoit Boissinot
624e32832b run-tests.py: report missing file as an error 2008-10-18 22:44:01 +02:00
Benoit Boissinot
44d89759ff run-tests.py: use --prefix instead of --home
Some SUSE version don't like --home, they fail with:
"error: must supply either home or prefix/exec-prefix -- not both"

this is due to SUSE shipping a distutils.cfg conflicting with --home.
2008-10-18 21:08:44 +02:00
Benoit Boissinot
1dcbb85da7 run-tests.py: fix the check for the hg installation with -jn (n > 1) 2008-09-10 13:52:33 +02:00
Dirkjan Ochtman
8c471ba704 imported patch test-check 2008-09-03 19:01:35 +02:00
Thomas Arendsen Hein
6fbdf04649 run-tests.py: Make tests run with python2.3 if HGTEST_* is set.
optparse of python2.3 does not transform default values to the specified
type so e.g. "HGTEST_JOBS=4" (introduced in b8e8d6b0ae08) causes tests
to abort, because options.jobs is set to '4' instead of the number 4.
2008-06-16 11:37:26 +02:00
Thomas Arendsen Hein
818fb02fb9 run-tests.py: Only one fail message when output changed and error code.
This fixes passing back fail messages mistaken for skip messages when
running with parallel jobs because run_children() only expects one message per
fail.
2008-03-24 22:09:01 +01:00
Thomas Arendsen Hein
702b9172d1 run-tests.py: Allow environment variables to set jobs/timeout/port. 2008-03-23 21:48:38 +01:00
Matt Mackall
f9e70fb40e tests: teach -i about fails list 2008-03-21 15:57:22 -05:00
Benoit Boissinot
3a35d838ed run-tests.py: add a summary of failed tests at the end 2008-03-13 17:39:30 +01:00
Joel Rosdahl
4f8012378a Remove unused imports 2008-03-06 22:23:41 +01:00
Thomas Arendsen Hein
9ff01ae3fe Replaced tab in run-tests.py 2008-03-07 00:01:13 +01:00
Peter Arrenbrecht
85ef77aca1 tests: add --keep-tmp to run-tests.py to debug test environment
When set, you can find the working dir of the test run as a
uniquely named subdirectory of --tmpdir so you can inspect
it.
2008-03-05 08:00:05 +01:00
Matt Mackall
9d996cd13f merge: allow smarter tool configuration
Add [merge-tool] hgrc section with:
 <tool>.executable = name or path (<tool>)
 <tool>.args = args with $local/base/other/output ($local $base $other)
 <tool>.priority = priority (default 0)
 <tool>.binary = handles binary (False)
 <tool>.symlink = handles symlinks (False)
 <tool>.checkconflict = check for conflict markers (False)
 <tool>.premerge = try internal simplemerge (True if not binary or symlink)

Four built-in tools: internal:{merge,local,other,fail}

Add [merge-patterns] section of the form:
 <pattern> = <tool>

Priority of settings is:
 HGMERGE
 merge-patterns
 ui:merge
 merge-tools by priority
 hgmerge, if it can be found

Changes:
 unsuccessful merges leave .orig files
2008-02-03 19:29:05 -06:00