Don't try to add the generated testcase to the list of possible test files if it already exists

Fixes #975

Signed-off-by: Jesse Vincent <jesse@keyboard.io>
pull/977/head
Jesse Vincent 4 years ago
parent 0dc3861f3a
commit 8c13d25cc3
No known key found for this signature in database
GPG Key ID: CC228463465E40BC

@ -14,10 +14,16 @@ LIB_FILE=${BIN_FILE}-latest.a
TEST_FILES=$(wildcard $(SRC_DIR)/*.cpp) TEST_FILES=$(wildcard $(SRC_DIR)/*.cpp)
# If we have a ktest file, we want to turn it into a generated testcase # If we have a ktest file and no generated testcase,
# we want to turn it into a generated testcase
# and add it to the list of possible test files
ifneq (,$(wildcard test.ktest)) ifneq (,$(wildcard test.ktest))
ifeq (,$(findstring $(SRC_DIR)/generated-testcase.cpp, $(TEST_FILES)))
TEST_FILES += $(SRC_DIR)/generated-testcase.cpp TEST_FILES += $(SRC_DIR)/generated-testcase.cpp
endif endif
endif
TEST_OBJS=$(patsubst $(SRC_DIR)/%.cpp,${OBJ_DIR}/%.o,$(TEST_FILES)) TEST_OBJS=$(patsubst $(SRC_DIR)/%.cpp,${OBJ_DIR}/%.o,$(TEST_FILES))

Loading…
Cancel
Save