Commit Graph

12 Commits

Author SHA1 Message Date
Matt Harbison
9638df605c run-tests: add substitution patterns for common '\' path output on Windows
The goal is to reduce the amount of hand tuning of new/changed tests that is
required on Windows.  Since the OS prints the proper paths everywhere else, this
is limited to Windows.  These are based on the check-code rules that were
dropped in 217bd5cb0914.

There are some minor tweaks, because those were trying to detect '/' paths
without a '(glob)' at the end, whereas these detect '\' paths. Also, it looks
like the 'no changes made to subrepo' one was broke, because the path to the
subrepo has been getting output but was not in the pattern.  End anchors are
dropped because '(glob)' is no longer required, but '(feature !)' annotations
are a possibility.

The 'saved backup bundle' pattern dropped from run-tests.py was simply carrying
over the first capture group.  The replace() method runs prior to evaluating
'\1', but it wasn't doing anything because of the 'r' prefix on '\\'.

The 'not recording move' entry is new, because I stumbled upon it searching for
some of these patterns.  There are probably others.
2017-12-12 20:11:13 -05:00
Matt Harbison
44a151c9d6 tests: convert the 'file://\$TESTTMP' rule to an automatic substitution
The rule only triggered on non Windows platforms, even though Windows also
required an adjustment.  Automatic seems better.

The aggressive globbing in test-subrepo-svn.t was found and rewritten by the
substitution.
2017-12-16 11:32:10 -05:00
Boris Feld
e7031fe580 push: include a 'check:bookmarks' part when possible
Before updating the actual bookmark update, we can start with updating the way
we check for push race. Checking bookmarks state earlier is useful even if we
still use pushkey. Aborting before the changegroup is added can save a lot of
time.
2017-11-13 04:22:45 +01:00
Boris Feld
f12384139a test: fix common-pattern for pure variant
The $USUAL_COMPRESSIONS$ value that was taken was not compatible with the pure
variant systems as zlib seems to not be available in these case.

Differential Revision: https://phab.mercurial-scm.org/D1562
2017-11-29 23:20:52 -05:00
Matt Harbison
26d7de6319 tests: add a substitution for EADDRINUSE/WSAEADDRINUSE messages
I suspect some more of these are globbed out, so this is a bit of future
proofing.
2017-12-02 20:03:28 -05:00
Matt Harbison
aae64c603b tests: add a substitution for ECONNRESET/WSAECONNRESET messages 2017-12-02 20:10:58 -05:00
Matt Harbison
d0fab5d188 tests: add a substitution for ENOTDIR/ERROR_PATH_NOT_FOUND messages 2017-12-02 20:38:23 -05:00
Matt Harbison
d2dab77cb0 tests: add a substitution for ENOENT/ERROR_FILE_NOT_FOUND messages
Automatic replacement seems better than trying to figure out a check-code rule.
I didn't bother looking to see why the error message and file name is reversed
in the annotate and histedit tests, based on Windows or not.

I originally had this as a list of tuples, conditional on the platform.  But
there are a couple of 'No such file or directory' messages emitted by Mercurial
itself, so unconditional is required for stability.  There are also several
variants of what I assume is 'connection refused' and 'unknown host' in
test-clone.t and test-clonebundles.t for Docker, FreeBSD jails, etc.  Yes, these
are handled by (re) tags, but maybe it would be better to capture those strings
in order to avoid whack-a-mole in future tests.  All of this points to using a
dictionary containing one or more strings-to-be-replaced values.
2017-12-02 19:33:34 -05:00
Boris Feld
d4cfe52f57 test-pattern: substitute the HTTP log timestamp too
We add a pattern matching the infamous timestamp in http log. Now, we should be
able to have change appears in https log without having to re-glob the whole
thing over and over.
2017-11-05 08:23:53 +01:00
Boris Feld
b14cfc9866 test-pattern: register the current the bundle2 capabilities string
The bundle capabilites are sent with every getbundle ssh connection. Every time
the protocol is updated, that string is altered. We get the part about bundle2
string replaced by $USUAL_BUNDLE2_CAPS$ so that we only have to change the
substitution whenever this happens.
2017-11-13 04:59:45 +01:00
Boris Feld
0305ed990e test-pattern: register current the bundlecaps string
The bundle capabilites sent with every getbundle commands. Every time the
protocol is updated, that string is altered. We get that string replace by
$USUAL_BUNDLE_CAPS$ so that we only have to change the substitution whenever
this happens.
2017-11-05 06:43:40 +01:00
Boris Feld
e7093ea4bd test-pattern: substitute common compression list
The compression list as to be matched with a glob because zstd might not be part
of the option. By using a substitution for these, we won't have to re-glob them
over and over.
2017-11-05 06:41:38 +01:00