From e4b7ceb05ddddbddb8809e22d86ac20a019959fd Mon Sep 17 00:00:00 2001 From: Evan Shelhamer Date: Sat, 7 Feb 2015 00:33:15 -0800 Subject: [PATCH] only dynamically link the tests No need to independently test static and dynamic linking. --- Makefile | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 0fcbb8c..f94867b 100644 --- a/Makefile +++ b/Makefile @@ -123,10 +123,8 @@ TEST_CU_BINS := $(addsuffix .testbin,$(addprefix $(TEST_BIN_DIR)/, \ TEST_CXX_BINS := $(addsuffix .testbin,$(addprefix $(TEST_BIN_DIR)/, \ $(foreach obj,$(TEST_CXX_OBJS),$(basename $(notdir $(obj)))))) TEST_BINS := $(TEST_CXX_BINS) $(TEST_CU_BINS) -# TEST_ALL_BIN is the test binary that links caffe statically. +# TEST_ALL_BIN is the test binary that links caffe dynamically. TEST_ALL_BIN := $(TEST_BIN_DIR)/test_all.testbin -# TEST_ALL_DYNINK_BIN is the test binary that links caffe as a dynamic library. -TEST_ALL_DYNLINK_BIN := $(TEST_BIN_DIR)/test_all_dynamic_link.testbin ############################## # Derive compiler warning dump locations @@ -445,9 +443,8 @@ $(MAT$(PROJECT)_SO): $(MAT$(PROJECT)_SRC) $(STATIC_NAME) CXXFLAGS="\$$CXXFLAGS $(MATLAB_CXXFLAGS)" \ CXXLIBS="\$$CXXLIBS $(STATIC_LINK_COMMAND) $(LDFLAGS)" -output $@ -runtest: $(TEST_ALL_BIN) $(TEST_ALL_DYNLINK_BIN) - $(TEST_ALL_BIN) $(TEST_GPUID) --gtest_shuffle $(TEST_FILTER) && \ - $(TEST_ALL_DYNLINK_BIN) $(TEST_GPUID) --gtest_shuffle $(TEST_FILTER) +runtest: $(TEST_ALL_BIN) + $(TEST_ALL_BIN) $(TEST_GPUID) --gtest_shuffle $(TEST_FILTER) pytest: py cd python; python -m unittest discover -s caffe/test @@ -511,13 +508,7 @@ $(BUILD_DIR)/cuda/%.o: %.cu | $(ALL_BUILD_DIRS) || (cat $@.$(WARNS_EXT); exit 1) @ cat $@.$(WARNS_EXT) -$(TEST_ALL_BIN): $(TEST_MAIN_SRC) $(TEST_OBJS) $(GTEST_OBJ) $(STATIC_NAME) \ - | $(TEST_BIN_DIR) - @ echo CXX/LD -o $@ $< - $(Q)$(CXX) $(TEST_MAIN_SRC) $(TEST_OBJS) $(GTEST_OBJ) $(STATIC_LINK_COMMAND) \ - -o $@ $(LINKFLAGS) $(LDFLAGS) - -$(TEST_ALL_DYNLINK_BIN): $(TEST_MAIN_SRC) $(TEST_OBJS) $(GTEST_OBJ) \ +$(TEST_ALL_BIN): $(TEST_MAIN_SRC) $(TEST_OBJS) $(GTEST_OBJ) \ | $(DYNAMIC_NAME) $(TEST_BIN_DIR) @ echo CXX/LD -o $@ $< $(Q)$(CXX) $(TEST_MAIN_SRC) $(TEST_OBJS) $(GTEST_OBJ) \ -- 2.7.4