Commit Graph

14 Commits

Author SHA1 Message Date
Jun Wu
effa0da8de test-helpers: add a helper to run test using chg
Summary:
The helper could be used in individual tests to enable chg if chg exists.
This allows us to have more precise control on what tests to use chg instead
of using a global flag in run-tests.py.

This makes certain tests containing many hg commands much faster. For example,
`test-revset.t` took 99 seconds before:

  % ./run-tests.py test-revset.t --time
  .
  # Ran 1 tests, 0 skipped, 0 failed.
  # Producing time report
  start   end     cuser   csys    real      Test
    0.000  99.990  86.410  12.000  99.990   test-revset.t

And 10 seconds after:

  % ./run-tests.py test-revset.t --time
  .
  # Ran 1 tests, 0 skipped, 0 failed.
  # Producing time report
  start   end     cuser   csys    real      Test
    0.000  10.080   0.380   0.130  10.080   test-revset.t

Also enable it for some other tests. Note the whitelist is not complete.  We
probably want to whitelist more tests in the future.

The feature could be opted out by deleting `contrib/chg/chg`.

Reviewed By: phillco

Differential Revision: D6767036

fbshipit-source-id: 8220cf408aa198d5d8e2ca5127ca60e2070d3444
2018-04-13 21:50:54 -07:00
Yuya Nishihara
4560adf4ef tests: silence output of darcs command
It appears darcs is more verbose by default these days. I got test failure
with Darcs 2.12.4.
2016-11-05 13:16:40 +09:00
Matt Mackall
11be5cc27c tests: replace exit 80 with #require 2014-08-06 11:43:59 -05:00
Martin Geisler
7316194bdf tests: don't load unnecessary graphlog extension
Since graphlog is in core, we can use 'hg log -G' instead.
2013-11-22 19:14:17 +01:00
Patrick Mezard
09919ad92f test-convert-darcs.t: fix elementtree test
On OSX, the test succeeds because darcs aborts when trying to convert
the dummy repository, and the test only grep for the output. On Windows,
the darcs call succeeds for some reason but darcs fails to emit any output,
which is not a valid XML output, which causes a traceback including the
ElementTree string matched by the check, and makes a false positive.

Check with a real repository instead. The darcs upgrade test is moved
at the end so we can use our handmade darcs repository for the test.
2012-08-03 17:56:34 +02:00
Mads Kiilerich
ccfffc07ba tests: add missing no-outer-repo requirements
Outer repos (if any) will now never be touched by the tests. But it is better
to run without any repos around the tmp directory.
2012-06-20 23:41:21 +02:00
Bryan O'Sullivan
18be3ce9f0 tests: make test-convert-darcs.t happier with darcs 2.8.0 2012-05-13 11:47:55 +02:00
Matt Mackall
0e1a6951ac tests: darcs > 2.5 got "smart" about encoding, disable encoding tests
We can no longer convert a repo with mixed encodings, nor can I even
figure out how to get Darcs to display such messages.
2011-10-22 11:21:00 -05:00
Nicolas Dumazet
274ada7d8c tests: move test bundles in a bundles/ subdirectory 2011-04-30 17:38:06 +02:00
Idan Kamara
416ff8e770 tests: no need to explicitly export HOME in test files
the test runner ensures that HOME is set to a temp dir
2011-03-25 22:18:05 +02:00
Mads Kiilerich
8e085520f4 tests: use (esc) instead of other kinds of string escaping 2010-11-08 01:41:42 +01:00
Mads Kiilerich
635406bf76 tests: use (esc) for all non-ASCII test output 2010-11-08 01:41:41 +01:00
Matt Mackall
b37df2f50a merge with stable 2010-10-12 16:25:38 -05:00
Matt Mackall
6edfd1dac8 tests: unify test-convert-darcs 2010-09-26 16:45:51 -05:00