Fix some dependency errors in test makefile rules that could cause

parallel testing to fail
pull/1147/head
Jesse Vincent 3 years ago
parent 5f03dbd245
commit b83604d37e
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -64,7 +64,7 @@ endif
TEST_OBJS=$(patsubst $(SRC_DIR)/%.cpp,${OBJ_DIR}/%.o,$(TEST_FILES)) TEST_OBJS=$(patsubst $(SRC_DIR)/%.cpp,${OBJ_DIR}/%.o,$(TEST_FILES))
build: ${BIN_DIR}/${BIN_FILE} compile-sketch build: $(if $(HAS_KTEST_FILE), generate-testcase) compile-sketch
all: run all: run
@ -72,9 +72,10 @@ run: ${BIN_DIR}/${BIN_FILE}
$(info Running test $(testcase)) $(info Running test $(testcase))
$(QUIET) "${BIN_DIR}/${BIN_FILE}" -t -q $(QUIET) "${BIN_DIR}/${BIN_FILE}" -t -q
${BIN_DIR}/${BIN_FILE}: ${TEST_OBJS} ${BIN_DIR}/${BIN_FILE}: compile-sketch
# We force sketch recompiliation because otherwise, make won't pick up changes to...anything on the arduino side # We force sketch recompiliation because otherwise, make won't pick up changes to...anything on the arduino side
.PHONY: compile-sketch
compile-sketch: ${TEST_OBJS} compile-sketch: ${TEST_OBJS}
@install -d "${BIN_DIR}" "${LIB_DIR}" @install -d "${BIN_DIR}" "${LIB_DIR}"
$(QUIET) env LIBONLY=yes VERBOSE=${VERBOSE} \ $(QUIET) env LIBONLY=yes VERBOSE=${VERBOSE} \
@ -91,9 +92,9 @@ compile-sketch: ${TEST_OBJS}
# If we have a test.ktest file, it should be processed into a c++ testcase # If we have a test.ktest file, it should be processed into a c++ testcase
.PHONY: generate-testcase
generate-testcase: $(if $(HAS_KTEST_FILE), ${SRC_DIR}/generated-testcase.cpp) generate-testcase: $(if $(HAS_KTEST_FILE), ${SRC_DIR}/generated-testcase.cpp)
${SRC_DIR}/generated-testcase.cpp: test.ktest ${SRC_DIR}/generated-testcase.cpp: test.ktest
ifneq (,$(wildcard test.ktest)) ifneq (,$(wildcard test.ktest))
ifdef VERBOSE ifdef VERBOSE

Loading…
Cancel
Save