]> git.lizzy.rs Git - rust.git/commitdiff
Disable the spanview tests on MacOS for now
authorRich Kadel <richkadel@google.com>
Fri, 6 Nov 2020 02:21:30 +0000 (18:21 -0800)
committerRich Kadel <richkadel@google.com>
Fri, 6 Nov 2020 04:24:36 +0000 (20:24 -0800)
And even though CI should now pass for MacOS, the llvm-cov show --debug
flag does not work when developing outside of CI, so I'm disabling it
for MacOS by default.

src/test/run-make-fulldeps/coverage-reports-base/Makefile
src/test/run-make-fulldeps/coverage-spanview-base/Makefile

index 7645bd4b4a3413796a4c2bb28545d5eb025d8908..b175768e1996286d54f2a96b8f9ecffb368561eb 100644 (file)
 BASEDIR=../coverage-reports-base
 SOURCEDIR=../coverage
 
+ifeq ($(UNAME),Darwin)
+# FIXME(richkadel): It appears that --debug is not available on MacOS even when not running
+# under CI.
+NO_LLVM_ASSERTIONS=1
+endif
+
 # The `llvm-cov show` flag `--debug`, used to generate the `counters` output files, is only enabled
 # if LLVM assertions are enabled. Some CI builds disable debug assertions.
 ifndef NO_LLVM_ASSERTIONS
index 3160fd6c05a69f395345b54fe7beafb9d4dd05ac..fb9f5215fe8ee8e41a9c6989b6a1b24efc1eaa72 100644 (file)
@@ -9,6 +9,10 @@
 BASEDIR=../coverage-spanview-base
 SOURCEDIR=../coverage
 
+ifeq ($(UNAME),Darwin)
+SED_HAS_ISSUES=1
+endif
+
 all: $(patsubst $(SOURCEDIR)/%.rs,%,$(wildcard $(SOURCEDIR)/*.rs))
 
 # Ensure there are no `expected` results for tests that may have been removed or renamed
@@ -29,6 +33,14 @@ endif
                        -Zdump-mir-spanview \
                        -Zdump-mir-dir="$(TMPDIR)"/mir_dump.$@
 
+ifdef SED_HAS_ISSUES
+       # FIXME(richkadel): MacOS's default sed has some significant limitations. Until I've come up
+       # with a better workaround, I'm disabling this test for MacOS.
+       #
+       # For future reference, see if `gsed` is available as an alternative.
+       which gsed || echo "no gsed"
+else
+
        for path in "$(TMPDIR)"/mir_dump.$@/*; do \
                echo $$path; \
                file="$$(basename "$$path")"; \
@@ -58,3 +70,5 @@ else
        cp "$(TMPDIR)"/mir_dump.$@/*InstrumentCoverage.0.html "$(TMPDIR)"/actual_mir_dump.$@/
        $(DIFF) -r expected_mir_dump.$@/ "$(TMPDIR)"/actual_mir_dump.$@/
 endif
+
+endif