From fc7eae743e4bed9a92bed5f36c909be7d8409edb Mon Sep 17 00:00:00 2001 From: Erich Keane Date: Fri, 30 Jan 2015 13:29:49 -0800 Subject: [PATCH] Altered the .gitignore to properly ignore unittest build biproducts gitignore wasn't ignoring the gtest install and hippomocks installed components. Cleaned whitespace for the unittests makefile, which had tons of trailing whitespace issues. Change-Id: I10c4505ddf56df6d34e972553f93531132d53af3 Signed-off-by: Erich Keane Reviewed-on: https://gerrit.iotivity.org/gerrit/280 Tested-by: jenkins-iotivity Reviewed-by: William Dieter Reviewed-by: Yuliya Kamatkova Reviewed-by: Sudarshan Prasad --- .gitignore | 7 +++++++ resource/unittests/makefile | 16 ++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index aec3a0b..4432972 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,9 @@ resource/oc_logger/lib/ resource/oc_logger/samples/linux/release/ resource/oc_logger/samples/linux/debug +resource/unittests/release/ +resource/unittests/debug/ + service/things-manager/build/linux/release service/things-manager/build/linux/debug service/things-manager/sdk/build/linux/ @@ -35,6 +38,8 @@ service/things-manager/sdk/build/linux/ *.cproject *.project +# Ignore CTags default data +tags # Ignore dependencies folder, which should be generated dependencies/ @@ -54,4 +59,6 @@ platform # Ignore downloaded dependencies extlibs/gtest* +extlibs/hippomocks-master/ +extlibs/master.zip extlibs/cereal diff --git a/resource/unittests/makefile b/resource/unittests/makefile index 21fa477..eb5b898 100644 --- a/resource/unittests/makefile +++ b/resource/unittests/makefile @@ -48,7 +48,7 @@ INC_DIRS += -I$(MOCKS_DIR)/HippoMocksTest LIB_OC_LOGGER := ../oc_logger/lib/oc_logger.a -GTEST_LIBS := $(GTEST_DIR)/lib/.libs/libgtest.a $(GTEST_DIR)/lib/.libs/libgtest_main.a +GTEST_LIBS := $(GTEST_DIR)/lib/.libs/libgtest.a $(GTEST_DIR)/lib/.libs/libgtest_main.a CXX_LIBS := ../$(BUILD)/obj/liboc.a ../csdk/$(PLATFORM)/$(BUILD)/liboctbstack.a $(LIB_OC_LOGGER) CXX_LIBS += $(GTEST_LIBS) @@ -59,26 +59,26 @@ CC_FLAGS.release := -Os -Wall -fdata-sections -Wl,--gc-sections -Wl,-s \ CPPFLAGS += $(CC_FLAGS.$(BUILD)) $(CXX_LIBS) -lpthread -all: prep_dirs $(MOCKS_DIR) unittests +all: prep_dirs $(MOCKS_DIR) unittests prep_dirs: -mkdir -p $(OUT_DIR) unittests: OCPlatformTest.cpp OCResourceTest.cpp ConstructResourceTest.cpp $(GTEST_LIBS) $(CXX) $^ $(CPPFLAGS) -o $(OUT_DIR)/$@ - -$(GTEST_DIR): + +$(GTEST_DIR): cd ../../extlibs && \ wget -q https://googletest.googlecode.com/files/gtest-1.7.0.zip && \ unzip gtest-1.7.0.zip - -$(GTEST_LIBS): $(GTEST_DIR) - cd $(GTEST_DIR) && ./configure && make + +$(GTEST_LIBS): $(GTEST_DIR) + cd $(GTEST_DIR) && ./configure && make $(MOCKS_DIR): cd ../../extlibs && \ wget -q https://github.com/dascandy/hippomocks/archive/master.zip && \ - unzip master.zip + unzip master.zip .PHONY: clean -- 2.7.4