From cfa96496bd9e7828c5626e2cd1353e9fb7d3d0c7 Mon Sep 17 00:00:00 2001 From: Pete Wyckoff Date: Sat, 26 Jan 2013 22:11:11 -0500 Subject: git p4 test: translate windows paths for cygwin Native windows binaries do not understand posix-like path mapping offered by cygwin. Convert paths to native using "cygpath --windows" before presenting them to p4d. This is done using the AltRoots mechanism of p4. Both the posix and windows forms are put in the client specification, allowing p4 to find its location by native path even though the environment reports a different PWD. Shell operations in tests will use the normal form of $cli, which will look like a posix path in cygwin, while p4 will use AltRoots to match against the windows form of the working directory. This mechanism also handles the symlink issue that was fixed in 23bd0c9 (git p4 test: use real_path to resolve p4 client symlinks, 2012-06-27). Now that every p4 client view has an AltRoots with the real_path in it, explicitly calculating the real_path elsewhere is not necessary. Thanks-to: Sebastian Schuberth Thanks-to: Johannes Sixt fixup! git p4 test: translate windows paths for cygwin Signed-off-by: Pete Wyckoff Signed-off-by: Junio C Hamano --- t/test-lib.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 't/test-lib.sh') diff --git a/t/test-lib.sh b/t/test-lib.sh index 1a6c4ab08c..9e7f6b424d 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -666,12 +666,14 @@ case $(uname -s) in # backslashes in pathspec are converted to '/' # exec does not inherit the PID test_set_prereq MINGW + test_set_prereq NOT_CYGWIN test_set_prereq SED_STRIPS_CR ;; *CYGWIN*) test_set_prereq POSIXPERM test_set_prereq EXECKEEPSPID test_set_prereq NOT_MINGW + test_set_prereq CYGWIN test_set_prereq SED_STRIPS_CR ;; *) @@ -679,6 +681,7 @@ case $(uname -s) in test_set_prereq BSLASHPSPEC test_set_prereq EXECKEEPSPID test_set_prereq NOT_MINGW + test_set_prereq NOT_CYGWIN ;; esac -- cgit v1.2.3