Commit Graph

9 Commits

Author SHA1 Message Date
Kostia Balytskyi
3d0e3ddc15 tests_: don't rebuild the project in test-hghave.t
Summary:
Our new build process is slow because of all the rust and everything. I've seen
test-hghave.t time out a couple of times already.

Test Plan:
- `./run-tests.py -l test-hghave.t` - pass
- `./run-tests.py test-hghave.t` - pass

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D6726709
2018-01-16 04:08:46 -08:00
Augie Fackler
0d393fc56a tests: invoke run-tests.py in test-hghave using $PYTHON (issue5697)
Some platforms (notably pkgsrc on NetBSD) only provide versioned
Python interpreters (eg `python2.7` exists, but `python` does not),
which exposes this error. We want to be running run-tests.py with the
python given in $PYTHON, since that might be `pypy` or `python3`.
2017-10-04 09:04:52 -04:00
Yuya Nishihara
8f3fa790c1 tests: alias syshg and syshgenv so they can be switched conditionally 2017-07-02 13:14:20 +09:00
Adam Simpkins
55a457de69 tests: use the system hg for examining the local repository
Most test scripts use "hg" to interact with a temporary test repository.
However a few tests also want to run hg commands to interact with the local
repository containing the mercurial source code.  Notably, many of the
test-check-* tests want to check local files and commit messages.

These tests were previously using the version of hg being tested to query the
source repository.  However, this will fail if the source repository requires
extensions or other settings not supported by the version of mercurial being
tested.  The source repository was typically initially cloned using the system
hg installation, so we should use the system hg installation to query it.

There was already a helpers-testrepo.sh script designed to help cope with
different requirements for the source repository versus the test repositories.
However, it only handled the evolve extension.  This new behavior works with
any extensions that are different between the system installation and the test
installation.
2017-06-27 17:24:31 -07:00
Gregory Szorc
896a966845 tests: remove support for warned tests
The previous changeset removed the last caller of addWarn(). So,
we rip out that method and all the code related to tracking warned
tests in the results system.

There was even a comment saying we may want to fold warned tests into
the "failed" state, which is what the previous changeset did.
2017-06-03 17:22:45 -07:00
timeless@mozdev.org
20963e1f94 run-tests: use $HGTEST_RUN_TESTS_PURE
test-run-tests and test-hghave call run-tests;
if you don't have a working build environment, and you are trying
to use --pure, then if they don't use --pure or --with-hg,
they'll break.
2015-09-02 15:19:05 -04:00
FUJIWARA Katsunori
3c2a14f766 hghave: allow adding customized features at runtime
Before this patch, there is no way to add customized features to
`hghave` without changing `hghave` and `hghave.py` themselves.

This decreases reusability of `run-tests.py` framework for third party
tools, because they may want to examine custom features at runtime
(e.g.  existence of some external tools).

To allow adding customized features at runtime, this patch makes
`hghave` import `hghaveaddon` module, only when `hghaveaddon.py` file
can be found in directories below:

  - `TESTDIR` for invocation via `run-tests.py`
  - `.` for invocation via command line

The path to the directory where `hghaveaddon.py` should be placed is
added to `sys.path` only while importing `hghaveaddon`, because:

  - `.` may not be added to `PYTHONPATH`

  - adding additional path to `sys.path` may change behavior of
    subsequent `import` for other features

`hghave` is terminated with exit code '2' at failure of `import
hghaveaddon`, because exit code '2' terminates `run-tests.py`
immediately.

This is a one of preparations for issue4677.
2015-07-03 06:56:03 +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
Matt Mackall
8043d43725 tests: unify test-hghave 2010-09-26 13:41:32 -05:00