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
FUJIWARA Katsunori
aeacfdc6d7 destutil: make messages at updating to the closed head usual form
This patch makes messages at updating to the closed head usual form
for Mercurial as below:

    one line description of the problem with no period
    (a suggestion about how to move forward or get more info)
2016-03-29 23:59:32 +09:00
FUJIWARA Katsunori
341f598342 tests: fix failure of test-convert-mtn.t
This is follow up for 16cd89d9d149, which overlooked this test.
2016-03-26 10:53:31 +09: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
Augie Fackler
a5ddb1dcfe tests: use $PYTHON instead of hardcoding python
This makes running the testsuite with pypy possible.
2014-10-15 15:35:59 -04: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
a52f5ba3fb test-convert-mtn.t: generate files in binary mode 2012-08-03 17:26:58 +02:00
Patrick Mezard
42d6e78b77 test-convert-mtn.t: use #if to set mtndir to the correct value
Monotone store directory name is not the same on Windows and Unix.
2012-08-03 17:26:30 +02:00
Matt Mackall
bb24ff7be7 tests: update monotone output for v1.0 changes 2011-05-21 15:01:28 -05:00
Daniel Atallah
54e55b4dbb convert/mtn: Fix conversion of large files from mtn (broken in 64963df7238d)
"mtn automate stdio" will break output larger than 32kB into several packets.
This ensures that we are processing all the output on the main stream and not
only the last packet.
2011-03-28 23:16:20 -04:00
Daniel Atallah
e07af26e9b convert/mtn: convert suspended branches as closed branches
Monotone treats branch closing ("suspending") in a similar manner to how we do
in mercurial - a cert is added to a revision that marks the branch to be hidden.
If a subsequent commit is made, the branch is effectively reopened.
2011-03-25 15:49:43 -04: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
Matt Mackall
b2af7a3e51 tests: unify test-convert-mtn 2010-09-26 17:18:28 -05:00