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
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
-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")"; \
cp "$(TMPDIR)"/mir_dump.$@/*InstrumentCoverage.0.html "$(TMPDIR)"/actual_mir_dump.$@/
$(DIFF) -r expected_mir_dump.$@/ "$(TMPDIR)"/actual_mir_dump.$@/
endif
+
+endif