[PATCH 1 of 3] tests: introduce 'hghave msys' to skip tests that would fail because of msys
Mads Kiilerich
mads at kiilerich.com
Mon Nov 21 00:57:33 UTC 2011
# HG changeset patch
# User Mads Kiilerich <mads at kiilerich.com>
# Date 1321836560 -3600
# Node ID a23c81257b1101c262426f60b59afd45dc5837c8
# Parent e19302598df88b5d16aed57fbbec07f547470946
tests: introduce 'hghave msys' to skip tests that would fail because of msys
diff --git a/tests/hghave b/tests/hghave
--- a/tests/hghave
+++ b/tests/hghave
@@ -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():
diff --git a/tests/test-clone-cgi.t b/tests/test-clone-cgi.t
--- a/tests/test-clone-cgi.t
+++ b/tests/test-clone-cgi.t
@@ -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
diff --git a/tests/test-newcgi.t b/tests/test-newcgi.t
--- a/tests/test-newcgi.t
+++ b/tests/test-newcgi.t
@@ -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.
diff --git a/tests/test-newercgi.t b/tests/test-newercgi.t
--- a/tests/test-newercgi.t
+++ b/tests/test-newercgi.t
@@ -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
diff --git a/tests/test-oldcgi.t b/tests/test-oldcgi.t
--- a/tests/test-oldcgi.t
+++ b/tests/test-oldcgi.t
@@ -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
diff --git a/tests/test-paths.t b/tests/test-paths.t
--- a/tests/test-paths.t
+++ b/tests/test-paths.t
@@ -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
diff --git a/tests/test-push-cgi.t b/tests/test-push-cgi.t
--- a/tests/test-push-cgi.t
+++ b/tests/test-push-cgi.t
@@ -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
diff --git a/tests/test-revset.t b/tests/test-revset.t
--- a/tests/test-revset.t
+++ b/tests/test-revset.t
@@ -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
More information about the Mercurial-devel
mailing list