threads / patch / 40538

patch, 2 partsgit-p4: Fix tests on OS X

Subject: [PATCH v1 0/2] git-p4: Fix tests on OS X

## tl;dr

4 messages between Oct 12, 2015 and Oct 22, 2015. Diffs are folded; open one to read it.

replies: 3people: 2as markdown or json

larsxschneider@gmail.com· Oct 12, 2015, 17:03 UTC · lore
From: Lars Schneider <larsxschneider@gmail.com>

I extracted this patch series from "[PATCH v3 0/3] Add Travis CI support" as suggested by Junio.

Thanks, Lars

Lars Schneider (2):
  git-p4: Improve test case portability for t9815 git-p4-submit-fail
  git-p4: Skip t9819 test case on case insensitive file systems
 t/t9815-git-p4-submit-fail.sh  | 7 ++-----
 t/t9819-git-p4-case-folding.sh | 6 ++++++
 2 files changed, 8 insertions(+), 5 deletions(-)

-- 2.5.1

larsxschneider@gmail.com· Oct 12, 2015, 17:03 UTC · re: larsxschneider@gmail.com · lore

[PATCH v1 1/2] git-p4: Improve test case portability for t9815 git-p4-submit-fail

From: Lars Schneider <larsxschneider@gmail.com>

Replace the stats command with the ls command to check file mode bits. The stats command is not available on Windows and has different command line options on OS X.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
---
 t/t9815-git-p4-submit-fail.sh | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
Show changes to t/t9815-git-p4-submit-fail.sh +2 −5
diff --git a/t/t9815-git-p4-submit-fail.sh b/t/t9815-git-p4-submit-fail.sh
index 4cff6a7..37b42d0 100755
--- a/t/t9815-git-p4-submit-fail.sh
+++ b/t/t9815-git-p4-submit-fail.sh
@@ -417,11 +417,8 @@ test_expect_success 'cleanup chmod after submit cancel' '
 		! p4 fstat -T action text &&
 		test_path_is_file text+x &&
 		! p4 fstat -T action text+x &&
-		if test_have_prereq !CYGWIN
-		then
-			stat --format=%A text | egrep ^-r-- &&
-			stat --format=%A text+x | egrep ^-r-x
-		fi
+		ls -l text | egrep ^-r-- &&
+		ls -l text+x | egrep ^-r-x
 	)
 '
 
-- 
2.5.1
larsxschneider@gmail.com· Oct 12, 2015, 17:03 UTC · re: larsxschneider@gmail.com · lore

[PATCH v1 2/2] git-p4: Skip t9819 test case on case insensitive file systems

From: Lars Schneider <larsxschneider@gmail.com>

Windows and OS X file systems are case insensitive by default. Consequently the "git-p4-case-folding" test case does not apply to them.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Acked-by: Luke Diamand <luke@diamand.org>
---
 t/t9819-git-p4-case-folding.sh | 6 ++++++
 1 file changed, 6 insertions(+)
Show changes to t/t9819-git-p4-case-folding.sh +6 −0
diff --git a/t/t9819-git-p4-case-folding.sh b/t/t9819-git-p4-case-folding.sh
index 78f1d0f..d808c00 100755
--- a/t/t9819-git-p4-case-folding.sh
+++ b/t/t9819-git-p4-case-folding.sh
@@ -4,6 +4,12 @@ test_description='interaction with P4 case-folding'
 
 . ./lib-git-p4.sh
 
+if test_have_prereq CASE_INSENSITIVE_FS
+then
+	skip_all='skipping P4 case-folding tests; case insensitive file system detected'
+	test_done
+fi
+
 test_expect_success 'start p4d with case folding enabled' '
 	start_p4d -C1
 '
-- 
2.5.1
Luke Diamand· Oct 22, 2015, 22:47 UTC · re: larsxschneider@gmail.com · lore

Re: [PATCH v1 0/2] git-p4: Fix tests on OS X

On 12/10/15 18:03, larsxschneider@gmail.com wrote:
> From: Lars Schneider <larsxschneider@gmail.com>
>
> I extracted this patch series from "[PATCH v3 0/3] Add Travis CI support" as
> suggested by Junio.
All seems sensible to me.
Luke
Show 15 quoted lines
>
> Thanks,
> Lars
>
> Lars Schneider (2):
>    git-p4: Improve test case portability for t9815 git-p4-submit-fail
>    git-p4: Skip t9819 test case on case insensitive file systems
>
>   t/t9815-git-p4-submit-fail.sh  | 7 ++-----
>   t/t9819-git-p4-case-folding.sh | 6 ++++++
>   2 files changed, 8 insertions(+), 5 deletions(-)
>
> --
> 2.5.1
>

← back to recent threads