1
1
mirror of https://github.com/rui314/mold.git synced 2024-10-04 16:48:04 +03:00
mold/test/Makefile.darwin
Rui Ueyama e4d6c8c382 [Mach-O] Fix test runner
If one of the test scripts fail, the entire test should fail.
2022-05-09 11:35:18 +08:00

16 lines
462 B
Makefile

TESTS = $(wildcard macho/*.sh)
test: $(TESTS)
# macOS's GNU make hasn't been updated since 3.8.1 perhaps due a concern
# of GPLv3. The --output-sync flag was introduced in GNU Make 4.0, so we
# can't use that flag on macOS.
#
# `tail -r | tail -r` is a poor-man's way to enable full buffering on a
# command output. `tail -r` outputs an input from the last line to the
# first.
$(TESTS):
@set -o pipefail; ./$@ 2>&1 | tail -r | tail -r
.PHONY: test $(TESTS)