Don't interleave output from test suite when running under gmake4 or

newer.

On gmake 3, warn the user
pull/1147/head
Jesse Vincent 3 years ago
parent 493528a556
commit fbbead928b
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -21,7 +21,9 @@ MAKEFLAGS += --no-builtin-rules
# GNU Make earlier than 4.0 don't have the output-sync option, but we need it
# to make parallel simulator test output readable. (otherwise it gets interleaved)
ifeq ($(shell test $(firstword $(subst ., ,$(MAKE_VERSION))) -ge 4; echo $$?),0)
SUBDIR_MAKEFLAGS+=--output-sync=target
MAKEFLAGS+=--output-sync=target
else
_using_old_make=1
endif
include $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/etc/makefiles/arduino-cli.mk
@ -73,6 +75,9 @@ update:
git submodule update --init --recursive
simulator-tests:
ifneq ($(_using_old_make),)
$(info You're using an older version of GNU Make that doesn't offer the --output-sync option. If you're running the test suite in parallel, output may be garbled. You might consider using GNU Make 4.0 or later instead)
endif
$(MAKE) -C tests all
docker-simulator-tests:

@ -69,6 +69,7 @@ build: $(if $(HAS_KTEST_FILE), generate-testcase) compile-sketch
all: run
run: ${BIN_DIR}/${BIN_FILE}
$(info )
$(info Running test $(testcase))
$(QUIET) "${BIN_DIR}/${BIN_FILE}" -t -q

@ -36,6 +36,10 @@ TESTS := $(shell cd $(tests_dir); find ${TEST_PATH} -name '*.ino' -exec dirname
KALEIDOSCOPE_CCACHE = 1
# The clutter up the test output on Make 4.0 and newer
MAKEFLAGS += --no-print-directory
include $(top_dir)/etc/makefiles/arduino-cli.mk
# If we start off in tests to run make all, the sketch makefiles guess the wrong location for

Loading…
Cancel
Save