[PATCH 13/14] git p4 test: keep P4CLIENT changes inside subshells

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tests assume that this is set to something valid.  Make sure
that the 'clone --use-client-spec' does not leak its changes
out into the rest of the tests.

Signed-off-by: Pete Wyckoff <pw@xxxxxxxx>
---
 t/t9806-git-p4-options.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/t/t9806-git-p4-options.sh b/t/t9806-git-p4-options.sh
index 3b0000f..8d914a5 100755
--- a/t/t9806-git-p4-options.sh
+++ b/t/t9806-git-p4-options.sh
@@ -226,9 +226,11 @@ test_expect_success 'clone --use-client-spec' '
 		View: //depot/sub/... //client2/bus/...
 		EOF
 	) &&
-	P4CLIENT=client2 &&
 	test_when_finished cleanup_git &&
-	git p4 clone --dest="$git" --use-client-spec //depot/... &&
+	(
+		P4CLIENT=client2 &&
+		git p4 clone --dest="$git" --use-client-spec //depot/...
+	) &&
 	(
 		cd "$git" &&
 		test_path_is_file bus/dir/f4 &&
@@ -241,6 +243,7 @@ test_expect_success 'clone --use-client-spec' '
 		cd "$git" &&
 		git init &&
 		git config git-p4.useClientSpec true &&
+		P4CLIENT=client2 &&
 		git p4 sync //depot/... &&
 		git checkout -b master p4/master &&
 		test_path_is_file bus/dir/f4 &&
-- 
1.8.1.350.gdbf6fd0

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]