changeset 15445:7cbb81c47025

tests: use 'hghave system-sh' to guard tests that requires sh in system()
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 07 Nov 2011 03:14:55 +0100
parents e1f05d7a8c7b
children c5c9ca3719f9
files tests/hghave tests/test-alias.t tests/test-clone-pull-corruption.t tests/test-hook.t
diffstat 4 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/hghave	Mon Nov 07 03:14:55 2011 +0100
+++ b/tests/hghave	Mon Nov 07 03:14:55 2011 +0100
@@ -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"),
--- a/tests/test-alias.t	Mon Nov 07 03:14:55 2011 +0100
+++ b/tests/test-alias.t	Mon Nov 07 03:14:55 2011 +0100
@@ -1,3 +1,5 @@
+  $ "$TESTDIR/hghave" system-sh || exit 80
+
   $ HGFOO=BAR; export HGFOO
   $ cat >> $HGRCPATH <<EOF
   > [extensions]
--- a/tests/test-clone-pull-corruption.t	Mon Nov 07 03:14:55 2011 +0100
+++ b/tests/test-clone-pull-corruption.t	Mon Nov 07 03:14:55 2011 +0100
@@ -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.
 
--- a/tests/test-hook.t	Mon Nov 07 03:14:55 2011 +0100
+++ b/tests/test-hook.t	Mon Nov 07 03:14:55 2011 +0100
@@ -1,3 +1,5 @@
+  $ "$TESTDIR/hghave" system-sh || exit 80
+
 commit hooks can see env vars
 
   $ hg init a