Mercurial > hg-stable
changeset 7429:dbc40381620e
tests: Skip tests if they will fail because of outer repo
For different reasons these tests will fail if run in a tmpdir which is in a hg
repo.
The following three tests assumes no .hg in path dirs - I don't know how to
work around that:
* test-dispatch explicitly tests for no repo and expects "abort: There is no
Mercurial repository here (.hg not found)!"
* test-extension expects parentui to be None when not cd'ed to a repo dir
* test-globalopts tests that implicit -R works correctly - that could perhaps be
done from another repo instead of assuming no repo
The following two might be worth investigating further:
* test-convert-svn-sink fails for unknown reasons, starting with "abort:
unresolved merge conflicts (see hg resolve)"
* test-glog gets strange failures when testing "from outer space"
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Thu, 27 Nov 2008 00:57:31 +0100 |
parents | fdcde929ce4f |
children | f0a3e87c810d |
files | tests/hghave tests/test-convert-svn-sink tests/test-dispatch tests/test-extension tests/test-globalopts tests/test-glog |
diffstat | 6 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/hghave Thu Nov 27 00:57:30 2008 +0100 +++ b/tests/hghave Thu Nov 27 00:57:31 2008 +0100 @@ -154,6 +154,9 @@ except ImportError: return False +def has_outer_repo(): + return matchoutput('hg root 2>&1', r'') + checks = { "baz": (has_baz, "GNU Arch baz client"), "bzr": (has_bzr, "Canonical's Bazaar client"), @@ -169,6 +172,7 @@ "inotify": (has_inotify, "inotify extension support"), "lsprof": (has_lsprof, "python lsprof module"), "mtn": (has_mtn, "monotone client (> 0.31)"), + "outer-repo": (has_outer_repo, "outer repo"), "pygments": (has_pygments, "Pygments source highlighting library"), "svn": (has_svn, "subversion client and admin tools"), "svn-bindings": (has_svn_bindings, "subversion python bindings"),
--- a/tests/test-convert-svn-sink Thu Nov 27 00:57:30 2008 +0100 +++ b/tests/test-convert-svn-sink Thu Nov 27 00:57:31 2008 +0100 @@ -1,6 +1,6 @@ #!/bin/sh -"$TESTDIR/hghave" svn svn-bindings || exit 80 +"$TESTDIR/hghave" svn svn-bindings no-outer-repo || exit 80 fixpath() {
--- a/tests/test-dispatch Thu Nov 27 00:57:30 2008 +0100 +++ b/tests/test-dispatch Thu Nov 27 00:57:31 2008 +0100 @@ -1,6 +1,8 @@ #!/bin/sh # test command parsing and dispatch +"$TESTDIR/hghave" no-outer-repo || exit 80 + hg init a cd a echo a > a
--- a/tests/test-extension Thu Nov 27 00:57:30 2008 +0100 +++ b/tests/test-extension Thu Nov 27 00:57:31 2008 +0100 @@ -1,6 +1,8 @@ #!/bin/sh # Test basic extension support +"$TESTDIR/hghave" no-outer-repo || exit 80 + cat > foobar.py <<EOF import os from mercurial import commands