Commit Graph

18 Commits

Author SHA1 Message Date
Augie Fackler
e5d7bd82c5 cleanup: use $PYTHON to run python in many more tests
Spotted one of these, then wrote a check-code rule that caught them
all. It will be the next change.
2017-06-20 09:45:02 -04:00
Augie Fackler
6e00945221 tests: relax "Connection refused" match
We already had the match relaxed on Windows, but on Google Compute
Engine VMs I'm seeing "Network is unreachable" instead of "Connection
refused". At this point, just give up and make sure we get an error back.
2016-07-12 11:20:30 -04:00
Matt Mackall
b709208c37 tests: drop DAEMON_PIDS from killdaemons calls 2015-06-08 14:55:40 -05:00
Matt Mackall
3ad28905f6 tests: drop explicit $TESTDIR from executables
$TESTDIR is added to the path, so this is superfluous. Also,
inconsistent use of quotes means we might have broken on tests with
paths containing spaces.
2015-06-08 14:44:30 -05:00
Mike Hommey
7dcde933f1 tests: pull common http server setup out of individual tests
There are currently two different tests using roughly the same code to
create temporary scripts acting as HTTP servers. As there is going to
be at least one more in an upcoming change, factor those out in a
standalone dumbhttp.py script.
2014-10-16 13:48:51 +09:00
Matt Mackall
11be5cc27c tests: replace exit 80 with #require 2014-08-06 11:43:59 -05:00
Adrian Buehlmann
2b98836d65 test-bad-pull: partially adjust for Windows
On a English Windows 7, the testcase fails with

  $ hg clone http://localhost:$HGPORT/ copy
  abort: error: No connection could be made because the target machine actively refused it

Since the error message on non-English Windows installs are most likely
different, we have to glob the entire error message away for Windows.
2012-06-19 17:05:04 +02:00
Mads Kiilerich
f64bae7ea3 tests: use 'do sleep 0' instead of 'do true', also on first line of command
2cd44a791e66 established that '... do true ...' shouldn't be used, but that was
only enforced on continued lines.
2012-04-23 01:56:48 +02:00
Matt Mackall
462be3c589 tests: re-silence test-bad-pull log messages 2012-04-02 15:06:36 -05:00
Matt Mackall
1c2151ba6e tests: fix shutdown race in test-bad-pull 2012-04-01 14:23:55 -05:00
Matt Mackall
3851075bbd tests: eliminate daemon race in test-bad-pull 2012-03-28 10:11:12 -05:00
Mads Kiilerich
cb035c4003 tests: remove hacks for testing if file or directory exists 2011-11-16 03:45:14 +01:00
Mads Kiilerich
8415df7277 tests: use 'hghave serve' to guard tests that requires serve daemon management 2011-11-07 03:24:53 +01:00
Brodie Rao
b5fe0d906e tests: add glob matching for unified tests
This adds a " (glob)" marker that works like a simpler version of
(re): "*" is converted to ".*", and "?" is converted to ".".

Both special characters can be escaped using "\", and the backslash
itself can be escaped as well.

Other glob-style syntax, like "**", "[chars]", or "[!chars]", isn't
supported.
2010-09-22 16:06:02 -05:00
Brodie Rao
7d7d96bd74 tests: require regexes in unified tests to be marked with " (re)"
Consider this test:

  $ hg glog --template '{rev}:{node|short} "{desc}"\n'
  @  2:20c4f79fd7ac "3"
  |
  | o  1:38f24201dcab "2"
  |/
  o  0:2a18120dc1c9 "1"

Because each line beginning with "|" can be compiled as a regular
expression (equivalent to ".*|"), they will match any output.

Similarly:

  $ echo foo


The blank output line can be compiled as a regular expression and will
also match any output.

With this patch, none of the above output lines will be matched as
regular expressions. A line must end in " (re)" in order to be matched
as one.

Lines are still matched literally first, so the following will pass:

  $ echo 'foo (re)'
  foo (re)
2010-09-22 16:06:00 -05:00
Matt Mackall
ac660e9f65 tests: cleanup exit code handling in unified tests 2010-09-21 16:00:02 -05:00
Matt Mackall
08439e0f2d tests: add exit codes to unified tests 2010-09-16 17:51:32 -05:00
Martin Geisler
f0378b0148 tests: unify test-bad-pull 2010-08-14 02:39:39 +02:00