Prepare our git-p4 tests for running on APFS
cover Prepare our git-p4 tests for running on APFS
Yesterday, the macOS agents of Azure Pipelines were upgraded to Mojave, and since that does not support HFS+ anymore, everything will be upgraded to APFS.
As I just found yesterday, we have one test that fails on that filesystem (t9822, which is only run if Perforce's p4d is available).
The first patch adds a workaround, as I failed to find any way to finagle APFS into accepting that ISO-8859-1 encoded file name.
The second patch is a fix to make things compile on Mojave again, apparently Homebrew changed and the /usr/local/ directories need to be added to the compiler and linker flags explicitly. Maybe this is a gcc-8 only thing, as it seems to have affected only the osx-gcc job, not the osx-clang job.
Johannes Schindelin (2):
t9822: skip tests if file names cannot be ISO-8895-1 encoded
macOS: make sure that gettext is found
config.mak.uname | 2 ++ t/t9822-git-p4-path-encoding.sh | 7 +++++++ 2 files changed, 9 insertions(+)
base-commit: e35b8cb8e212e3557efc565157ceb5cbaaf0d87f
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-179%2Fdscho%2Fskip-t9822-on-apfs-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-179/dscho/skip-t9822-on-apfs-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/179
Signature · 1 line
gitgitgadget
PATCH 1/2 t9822: skip tests if file names cannot be ISO-8895-1 encoded
From: Johannes Schindelin <[email protected]>
Most notably, it seems that macOS' APFS does not allow that.
--- t/t9822-git-p4-path-encoding.sh | 7 +++++++ 1 file changed, 7 insertions(+)
t/t9822-git-p4-path-encoding.sh +7 -0
@@ -7,6 +7,13 @@ test_description='Clone repositories with non ASCII paths' UTF8_ESCAPED="a-\303\244_o-\303\266_u-\303\274.txt" ISO8859_ESCAPED="a-\344_o-\366_u-\374.txt" +ISO8859="$(printf "$ISO8859_ESCAPED")" && +echo content123 >"$ISO8859" && +rm "$ISO8859" || { + skip_all="fs does not accept ISO-8859-1 filenames" + test_done +} + test_expect_success 'start p4d' ' start_p4d '
Signature · 1 line
gitgitgadget
PATCH 2/2 macOS: make sure that gettext is found
In reply to Johannes Schindelin via GitGitGadgetFrom: Johannes Schindelin <[email protected]>
Due to reasons (some XCode versions seem to include gettext, some don't?), Homebrew does not expose the libraries and headers in /usr/local/ by default anymore.
Let's help find them again.
Note: for some reason, this is a change of behavior caused by the upgrade to Mojave, identified in our Azure Pipeline; it seems that Homebrew used to add the /usr/local/ directories to the include and link search path before, but now it no longer does.
--- config.mak.uname | 2 ++ 1 file changed, 2 insertions(+)
config.mak.uname +2 -0
@@ -114,6 +114,8 @@ ifeq ($(uname_S),Darwin) HAVE_BSD_SYSCTL = YesPlease FREAD_READS_DIRECTORIES = UnfortunatelyYes HAVE_NS_GET_EXECUTABLE_PATH = YesPlease + BASIC_CFLAGS += -I/usr/local/include + BASIC_LDFLAGS += -L/usr/local/lib endif ifeq ($(uname_S),SunOS) NEEDS_SOCKET = YesPlease
Signature · 1 line
gitgitgadget
Re: [PATCH 1/2] t9822: skip tests if file names cannot be ISO-8895-1 encoded
In reply to Johannes Schindelin via GitGitGadgetQuoted 4 lines · Johannes Schindelin via GitGitGadget
From: Johannes Schindelin <[email protected]>
Most notably, it seems that macOS' APFS does not allow that.
Did you mean in the subject "ISO-8895-1" encoded or "ISO-8859-1" encoded?
It seems reasonable other than that!
Quoted 27 lines
Signed-off-by Johannes Schindelin <[email protected]>--- t/t9822-git-p4-path-encoding.sh | 7 +++++++ 1 file changed, 7 insertions(+)t/t9822-git-p4-path-encoding.sh +7
-1@@ -7,6 +7,13 @@ test_description='Clone repositories with non ASCII paths' UTF8_ESCAPED="a-\303\244_o-\303\266_u-\303\274.txt" ISO8859_ESCAPED="a-\344_o-\366_u-\374.txt" +ISO8859="$(printf "$ISO8859_ESCAPED")" && +echo content123 >"$ISO8859" && +rm "$ISO8859" || { + skip_all="fs does not accept ISO-8859-1 filenames" + test_done +} + test_expect_success 'start p4d' ' start_p4d ' --gitgitgadget
Re: [PATCH 1/2] t9822: skip tests if file names cannot be ISO-8895-1 encoded
Hi Luke,
Quoted 8 lines · Luke Diamand
Quoted 4 lines · Johannes Schindelin via GitGitGadget
From: Johannes Schindelin <[email protected]>
Most notably, it seems that macOS' APFS does not allow that.
Did you mean in the subject "ISO-8895-1" encoded or "ISO-8859-1" encoded?
D'oh... Fixed in v2!
Quoted 1 line
It seems reasonable other than that!
Thanks,
Dscho
PATCH v2 1/2 t9822: skip tests if file names cannot be ISO-8859-1 encoded
In reply to Johannes Schindelin via GitGitGadgetFrom: Johannes Schindelin <[email protected]>
Most notably, it seems that macOS' APFS does not allow that.
--- t/t9822-git-p4-path-encoding.sh | 7 +++++++ 1 file changed, 7 insertions(+)
t/t9822-git-p4-path-encoding.sh +7 -0
@@ -7,6 +7,13 @@ test_description='Clone repositories with non ASCII paths' UTF8_ESCAPED="a-\303\244_o-\303\266_u-\303\274.txt" ISO8859_ESCAPED="a-\344_o-\366_u-\374.txt" +ISO8859="$(printf "$ISO8859_ESCAPED")" && +echo content123 >"$ISO8859" && +rm "$ISO8859" || { + skip_all="fs does not accept ISO-8859-1 filenames" + test_done +} + test_expect_success 'start p4d' ' start_p4d '
Signature · 1 line
gitgitgadget
v2 cover Prepare our git-p4 tests for running on APFS
In reply to Johannes Schindelin via GitGitGadgetYesterday, the macOS agents of Azure Pipelines were upgraded to Mojave, and since that does not support HFS+ anymore, everything will be upgraded to APFS.
As I just found yesterday, we have one test that fails on that filesystem (t9822, which is only run if Perforce's p4d is available).
The first patch adds a workaround, as I failed to find any way to finagle APFS into accepting that ISO-8859-1 encoded file name.
The second patch is a fix to make things compile on Mojave again, apparently Homebrew changed and the /usr/local/ directories need to be added to the compiler and linker flags explicitly. Maybe this is a gcc-8 only thing, as it seems to have affected only the osx-gcc job, not the osx-clang job.
Changes since v1:
* Fix the tyop in the oneline of the first patch where it should talk about ISO-8859-1.
Johannes Schindelin (2):
t9822: skip tests if file names cannot be ISO-8859-1 encoded
macOS: make sure that gettext is found
config.mak.uname | 2 ++ t/t9822-git-p4-path-encoding.sh | 7 +++++++ 2 files changed, 9 insertions(+)
base-commit: e35b8cb8e212e3557efc565157ceb5cbaaf0d87f
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-179%2Fdscho%2Fskip-t9822-on-apfs-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-179/dscho/skip-t9822-on-apfs-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/179
Range-diff vs v1:
1: 52681aee0a ! 1: 6161c76702 t9822: skip tests if file names cannot be ISO-8895-1 encoded
@@ -1,6 +1,6 @@
Author: Johannes Schindelin <[email protected]>
- t9822: skip tests if file names cannot be ISO-8895-1 encoded
+ t9822: skip tests if file names cannot be ISO-8859-1 encoded
Most notably, it seems that macOS' APFS does not allow that.
2: f006524f78 = 2: 25be67b1b7 macOS: make sure that gettext is found
Signature · 1 line
gitgitgadget
PATCH v2 2/2 macOS: make sure that gettext is found
From: Johannes Schindelin <[email protected]>
Due to reasons (some XCode versions seem to include gettext, some don't?), Homebrew does not expose the libraries and headers in /usr/local/ by default anymore.
Let's help find them again.
Note: for some reason, this is a change of behavior caused by the upgrade to Mojave, identified in our Azure Pipeline; it seems that Homebrew used to add the /usr/local/ directories to the include and link search path before, but now it no longer does.
--- config.mak.uname | 2 ++ 1 file changed, 2 insertions(+)
config.mak.uname +2 -0
@@ -114,6 +114,8 @@ ifeq ($(uname_S),Darwin) HAVE_BSD_SYSCTL = YesPlease FREAD_READS_DIRECTORIES = UnfortunatelyYes HAVE_NS_GET_EXECUTABLE_PATH = YesPlease + BASIC_CFLAGS += -I/usr/local/include + BASIC_LDFLAGS += -L/usr/local/lib endif ifeq ($(uname_S),SunOS) NEEDS_SOCKET = YesPlease
Signature · 1 line
gitgitgadget
Re: [PATCH v2 1/2] t9822: skip tests if file names cannot be ISO-8859-1 encoded
In reply to Johannes Schindelin via GitGitGadgetHi Junio,
Quoted 5 lines · Johannes Schindelin via GitGitGadget
From: Johannes Schindelin <[email protected]>
Most notably, it seems that macOS' APFS does not allow that.
Signed-off-by Johannes Schindelin <[email protected]>
This is actually a quite important fix, really, as it makes *every* CI build fail in the macOS part, meaning that I am swamped with false positives until this is fixed.
It seems not to have made it into the js/macos-gettext-build branch, though. Would you terribly mind picking it up, please?
Thanks,
Dscho
Re: [PATCH v2 1/2] t9822: skip tests if file names cannot be ISO-8859-1 encoded
Quoted 3 lines · Johannes Schindelin
It seems not to have made it into the js/macos-gettext-build branch, though. Would you terribly mind picking it up, please?
I think they are separately queued, so that they can graduate in any order, even if/when one of them turns out to need rerolling.
Re: [PATCH v2 1/2] t9822: skip tests if file names cannot be ISO-8859-1 encoded
Hi Junio,
Quoted 8 lines · Junio C Hamano
Quoted 3 lines · Johannes Schindelin
It seems not to have made it into the js/macos-gettext-build branch, though. Would you terribly mind picking it up, please?
I think they are separately queued, so that they can graduate in any order, even if/when one of them turns out to need rerolling.
Okay.
Please note, though, that I had packaged them together because they *both* need to advance to any branch in order to make it pass on Azure Pipelines again. (And to be sure, they both fix real bugs in Git, they are not mere workarounds necessary to make the CI builds "green" again.)
Ciao,
Dscho