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`.
This commit is contained in:
parent
26e5bcd220
commit
01f5a2a81d
@ -1,4 +1,3 @@
|
||||
# ignore-test Broken; accidentally silently ignored on Linux CI; FIXME(#81688)
|
||||
# needs-profiler-support
|
||||
# ignore-windows-gnu
|
||||
# min-llvm-version: 11.0
|
||||
@ -128,7 +127,7 @@ endif
|
||||
$$( \
|
||||
for file in $(TMPDIR)/rustdoc-$@/*/rust_out; \
|
||||
do \
|
||||
[[ -x $$file ]] && printf "%s %s " -object $$file; \
|
||||
[ -x "$$file" ] && printf "%s %s " -object $$file; \
|
||||
done \
|
||||
) \
|
||||
2> "$(TMPDIR)"/show_coverage_stderr.$@.txt \
|
||||
|
@ -12,5 +12,3 @@
|
||||
# Enabling `-C link-dead-code` is not necessary when compiling with `-Z instrument-coverage`,
|
||||
# due to improvements in the coverage map generation, to add unreachable functions known to Rust.
|
||||
# Therefore, `-C link-dead-code` is no longer automatically enabled.
|
||||
|
||||
UNAME = $(shell uname)
|
||||
|
@ -21,6 +21,12 @@ CGREP := "$(S)/src/etc/cat-and-grep.sh"
|
||||
# diff with common flags for multi-platform diffs against text output
|
||||
DIFF := diff -u --strip-trailing-cr
|
||||
|
||||
# CI platforms use `/bin/dash`. When compiling in other environments, the
|
||||
# default may be different (for example, may default to `/bin/bash`), and syntax
|
||||
# and results could be different. Ensure Makefile `$(shell ...)` invocations
|
||||
# always run in `dash`.
|
||||
SHELL := /bin/dash
|
||||
|
||||
# This is the name of the binary we will generate and run; use this
|
||||
# e.g. for `$(CC) -o $(RUN_BINFILE)`.
|
||||
RUN_BINFILE = $(TMPDIR)/$(1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user