Skip to content

Commit 01f5a2a

Browse files
committed
Ensures make tests run under /bin/dash, like CI, and fixes a Makefile
Updates `tools.mk` to explicitly require `SHELL := /bin/dash`, since CI uses `dash` but other environments (including developer local machines) may default to `bash`. Replaces bash-specific shell command in one Makefile with a dash-compatible alternative, and re-enables the affected Makefile test. Removes apparently redundant definition of `UNAME`.
1 parent 26e5bcd commit 01f5a2a

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# ignore-test Broken; accidentally silently ignored on Linux CI; FIXME(#81688)
21
# needs-profiler-support
32
# ignore-windows-gnu
43
# min-llvm-version: 11.0
@@ -128,7 +127,7 @@ endif
128127
$$( \
129128
for file in $(TMPDIR)/rustdoc-$@/*/rust_out; \
130129
do \
131-
[[ -x $$file ]] && printf "%s %s " -object $$file; \
130+
[ -x "$$file" ] && printf "%s %s " -object $$file; \
132131
done \
133132
) \
134133
2> "$(TMPDIR)"/[email protected] \

src/test/run-make-fulldeps/coverage/coverage_tools.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,3 @@
1212
# Enabling `-C link-dead-code` is not necessary when compiling with `-Z instrument-coverage`,
1313
# due to improvements in the coverage map generation, to add unreachable functions known to Rust.
1414
# Therefore, `-C link-dead-code` is no longer automatically enabled.
15-
16-
UNAME = $(shell uname)

src/test/run-make-fulldeps/tools.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ CGREP := "$(S)/src/etc/cat-and-grep.sh"
2121
# diff with common flags for multi-platform diffs against text output
2222
DIFF := diff -u --strip-trailing-cr
2323

24+
# CI platforms use `/bin/dash`. When compiling in other environments, the
25+
# default may be different (for example, may default to `/bin/bash`), and syntax
26+
# and results could be different. Ensure Makefile `$(shell ...)` invocations
27+
# always run in `dash`.
28+
SHELL := /bin/dash
29+
2430
# This is the name of the binary we will generate and run; use this
2531
# e.g. for `$(CC) -o $(RUN_BINFILE)`.
2632
RUN_BINFILE = $(TMPDIR)/$(1)

0 commit comments

Comments
 (0)