[PATCH 11 of 19] tests: use 'hghave system-sh' to guard tests that requires sh in system()
Mads Kiilerich
mads at kiilerich.com
Sun Nov 6 20:41:01 CST 2011
# HG changeset patch
# User Mads Kiilerich <mads at kiilerich.com>
# Date 1320632095 -3600
# Node ID 38f49555d5a8e9ac26056e8dfe7882a747a02147
# Parent 9422d8100b51591ac9b93e6d142397f72cb2a51e
tests: use 'hghave system-sh' to guard tests that requires sh in system()
diff --git a/tests/hghave b/tests/hghave
--- a/tests/hghave
+++ b/tests/hghave
@@ -212,6 +212,9 @@
def has_windows():
return os.name == 'nt'
+def has_system_sh():
+ return os.name != 'nt'
+
checks = {
"baz": (has_baz, "GNU Arch baz client"),
"bzr": (has_bzr, "Canonical's Bazaar client"),
@@ -240,6 +243,7 @@
"svn15": (has_svn15, "subversion client and admin tools >= 1.5"),
"svn-bindings": (has_svn_bindings, "subversion python bindings"),
"symlink": (has_symlink, "symbolic links"),
+ "system-sh": (has_system_sh, "system() uses sh"),
"tla": (has_tla, "GNU Arch tla client"),
"unix-permissions": (has_unix_permissions, "unix-style permissions"),
"windows": (has_windows, "Windows"),
diff --git a/tests/test-alias.t b/tests/test-alias.t
--- a/tests/test-alias.t
+++ b/tests/test-alias.t
@@ -1,3 +1,5 @@
+ $ "$TESTDIR/hghave" system-sh || exit 80
+
$ HGFOO=BAR; export HGFOO
$ cat >> $HGRCPATH <<EOF
> [extensions]
diff --git a/tests/test-clone-pull-corruption.t b/tests/test-clone-pull-corruption.t
--- a/tests/test-clone-pull-corruption.t
+++ b/tests/test-clone-pull-corruption.t
@@ -1,3 +1,5 @@
+ $ "$TESTDIR/hghave" system-sh || exit 80
+
Corrupt an hg repo with a pull started during an aborted commit
Create two repos, so that one of them can pull from the other one.
diff --git a/tests/test-hook.t b/tests/test-hook.t
--- a/tests/test-hook.t
+++ b/tests/test-hook.t
@@ -1,3 +1,5 @@
+ $ "$TESTDIR/hghave" system-sh || exit 80
+
commit hooks can see env vars
$ hg init a
More information about the Mercurial-devel
mailing list