changeset 15567:8b84d040d9f9

tests: introduce 'hghave msys' to skip tests that would fail because of msys
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 21 Nov 2011 01:49:20 +0100
parents 7786b7dfbc46
children 08635f4e44be
files tests/hghave tests/test-clone-cgi.t tests/test-newcgi.t tests/test-newercgi.t tests/test-oldcgi.t tests/test-paths.t tests/test-push-cgi.t tests/test-revset.t
diffstat 8 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/hghave	Wed Nov 23 16:35:17 2011 -0600
+++ b/tests/hghave	Mon Nov 21 01:49:20 2011 +0100
@@ -221,6 +221,9 @@
 def has_tic():
     return matchoutput('test -x "`which tic`"', '')
 
+def has_msys():
+    return os.getenv('MSYSTEM')
+
 checks = {
     "baz": (has_baz, "GNU Arch baz client"),
     "bzr": (has_bzr, "Canonical's Bazaar client"),
@@ -255,6 +258,7 @@
     "tla": (has_tla, "GNU Arch tla client"),
     "unix-permissions": (has_unix_permissions, "unix-style permissions"),
     "windows": (has_windows, "Windows"),
+    "msys": (has_msys, "Windows with MSYS"),
 }
 
 def list_features():
--- a/tests/test-clone-cgi.t	Wed Nov 23 16:35:17 2011 -0600
+++ b/tests/test-clone-cgi.t	Mon Nov 21 01:49:20 2011 +0100
@@ -1,3 +1,5 @@
+  $ "$TESTDIR/hghave" no-msys || exit 80 # MSYS will translate web paths as if they were file paths
+
 This is a test of the wire protocol over CGI-based hgweb.
 initialize repository
 
--- a/tests/test-newcgi.t	Wed Nov 23 16:35:17 2011 -0600
+++ b/tests/test-newcgi.t	Mon Nov 21 01:49:20 2011 +0100
@@ -1,3 +1,5 @@
+  $ "$TESTDIR/hghave" no-msys || exit 80 # MSYS will translate web paths as if they were file paths
+
 This tests if CGI files from after d0db3462d568 but
 before d74fc8dec2b4 still work.
 
--- a/tests/test-newercgi.t	Wed Nov 23 16:35:17 2011 -0600
+++ b/tests/test-newercgi.t	Mon Nov 21 01:49:20 2011 +0100
@@ -1,3 +1,5 @@
+  $ "$TESTDIR/hghave" no-msys || exit 80 # MSYS will translate web paths as if they were file paths
+
 This is a rudimentary test of the CGI files as of d74fc8dec2b4.
 
   $ hg init test
--- a/tests/test-oldcgi.t	Wed Nov 23 16:35:17 2011 -0600
+++ b/tests/test-oldcgi.t	Mon Nov 21 01:49:20 2011 +0100
@@ -1,3 +1,5 @@
+  $ "$TESTDIR/hghave" no-msys || exit 80 # MSYS will translate web paths as if they were file paths
+
 This tests if CGI files from before d0db3462d568 still work.
 
   $ hg init test
--- a/tests/test-paths.t	Wed Nov 23 16:35:17 2011 -0600
+++ b/tests/test-paths.t	Mon Nov 21 01:49:20 2011 +0100
@@ -1,3 +1,5 @@
+  $ "$TESTDIR/hghave" no-msys || exit 80 # MSYS will translate /foo/bar as if it was a real file path
+
   $ hg init a
   $ hg clone a b
   updating to branch default
--- a/tests/test-push-cgi.t	Wed Nov 23 16:35:17 2011 -0600
+++ b/tests/test-push-cgi.t	Mon Nov 21 01:49:20 2011 +0100
@@ -1,3 +1,5 @@
+  $ "$TESTDIR/hghave" no-msys || exit 80 # MSYS will translate web paths as if they were file paths
+
 This is a test of the push wire protocol over CGI-based hgweb.
 
 initialize repository
--- a/tests/test-revset.t	Wed Nov 23 16:35:17 2011 -0600
+++ b/tests/test-revset.t	Mon Nov 21 01:49:20 2011 +0100
@@ -1,3 +1,5 @@
+  $ "$TESTDIR/hghave" no-msys || exit 80 # MSYS will translate /a/b/c/ as if it was a real file path
+
   $ HGENCODING=utf-8
   $ export HGENCODING