tests: use 'hghave serve' to guard tests that requires serve daemon management stable
authorMads Kiilerich <mads@kiilerich.com>
Mon, 07 Nov 2011 03:24:53 +0100
branchstable
changeset 1014 58b7f58ae08c
parent 1013 e00f51032041
child 1015 0a583943b4b4
tests: use 'hghave serve' to guard tests that requires serve daemon management [ original upstream message ]
tests/hghave
tests/test-keyword.t
--- a/tests/hghave	Mon Nov 07 03:14:55 2011 +0100
+++ b/tests/hghave	Mon Nov 07 03:24:53 2011 +0100
@@ -215,6 +215,9 @@
 def has_system_sh():
     return os.name != 'nt'
 
+def has_serve():
+    return os.name != 'nt' # gross approximation
+
 checks = {
     "baz": (has_baz, "GNU Arch baz client"),
     "bzr": (has_bzr, "Canonical's Bazaar client"),
@@ -237,6 +240,7 @@
     "p4": (has_p4, "Perforce server and client"),
     "pyflakes": (has_pyflakes, "Pyflakes python linter"),
     "pygments": (has_pygments, "Pygments source highlighting library"),
+    "serve": (has_serve, "platform and python can manage 'hg serve -d'"),
     "ssl": (has_ssl, "python >= 2.6 ssl module and python OpenSSL"),
     "svn": (has_svn, "subversion client and admin tools"),
     "svn13": (has_svn13, "subversion client and admin tools >= 1.3"),
--- a/tests/test-keyword.t	Mon Nov 07 03:14:55 2011 +0100
+++ b/tests/test-keyword.t	Mon Nov 07 03:24:53 2011 +0100
@@ -1,4 +1,4 @@
-  $ "$TESTDIR/hghave" symlink unix-permissions || exit 80
+  $ "$TESTDIR/hghave" symlink unix-permissions serve || exit 80
 
   $ cat <<EOF >> $HGRCPATH
   > [extensions]