# HG changeset patch # User Mads Kiilerich # Date 1320632095 -3600 # Node ID 7cbb81c470255a3faf5fa2c01843948e6d5a756a # Parent e1f05d7a8c7b027fdc503667fab7115c0097899d tests: use 'hghave system-sh' to guard tests that requires sh in system() diff -r e1f05d7a8c7b -r 7cbb81c47025 tests/hghave --- 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"), diff -r e1f05d7a8c7b -r 7cbb81c47025 tests/test-alias.t --- 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 < [extensions] diff -r e1f05d7a8c7b -r 7cbb81c47025 tests/test-clone-pull-corruption.t --- 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. diff -r e1f05d7a8c7b -r 7cbb81c47025 tests/test-hook.t --- 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