Skip to content

Commit

Permalink
Disable the spanview tests on MacOS for now
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
richkadel committed Nov 6, 2020
1 parent 430dcb6 commit 68014e6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/test/run-make-fulldeps/coverage-reports-base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
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
Expand Down
14 changes: 14 additions & 0 deletions src/test/run-make-fulldeps/coverage-spanview-base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")"; \
Expand Down Expand Up @@ -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

0 comments on commit 68014e6

Please sign in to comment.