Get ready to add tests to travis-ci
This commit is contained in:
parent
4c3b1881f2
commit
040cfd8e7d
1
.gitignore
vendored
1
.gitignore
vendored
@ -30,3 +30,4 @@ _zstdbench/
|
||||
*.idea
|
||||
*.swp
|
||||
.DS_Store
|
||||
googletest/
|
||||
|
@ -59,6 +59,11 @@ main.o: main.cpp *.h utils/*.h
|
||||
pzstd: libzstd.a Pzstd.o SkippableFrame.o Options.o main.o
|
||||
$(CXX) $(FLAGS) $^ -o $@$(EXT)
|
||||
|
||||
googletest:
|
||||
@git clone https://github.com/google/googletest
|
||||
@mkdir -p googletest/build
|
||||
@cd googletest/build && cmake .. && make
|
||||
|
||||
test: libzstd.a Pzstd.o Options.o SkippableFrame.o
|
||||
$(MAKE) -C utils/test test
|
||||
$(MAKE) -C test test
|
||||
@ -67,5 +72,5 @@ clean:
|
||||
$(MAKE) -C $(ZSTDDIR) clean
|
||||
$(MAKE) -C utils/test clean
|
||||
$(MAKE) -C test clean
|
||||
@$(RM) libzstd.a *.o pzstd$(EXT)
|
||||
@$(RM) -rf googletest/ libzstd.a *.o pzstd$(EXT)
|
||||
@echo Cleaning completed
|
||||
|
@ -7,10 +7,6 @@
|
||||
# of patent rights can be found in the PATENTS file in the same directory.
|
||||
# ##########################################################################
|
||||
|
||||
# Set GTEST_INC and GTEST_LIB to work with your install of gtest
|
||||
GTEST_INC ?= -isystem googletest/googletest/include
|
||||
GTEST_LIB ?= -L googletest/build/googlemock/gtest
|
||||
|
||||
# Define *.exe as extension for Windows systems
|
||||
ifneq (,$(filter Windows%,$(OS)))
|
||||
EXT =.exe
|
||||
@ -22,6 +18,10 @@ PZSTDDIR = ..
|
||||
PROGDIR = ../../../programs
|
||||
ZSTDDIR = ../../../lib
|
||||
|
||||
# Set GTEST_INC and GTEST_LIB to work with your install of gtest
|
||||
GTEST_INC ?= -isystem $(PZSTDDIR)/googletest/googletest/include
|
||||
GTEST_LIB ?= -L $(PZSTDDIR)/googletest/build/googlemock/gtest
|
||||
|
||||
CPPFLAGS = -I$(PZSTDDIR) $(GTEST_INC) $(GTEST_LIB) -I$(ZSTDDIR)/common -I$(PROGDIR)
|
||||
|
||||
CFLAGS ?= -O3
|
||||
@ -37,9 +37,11 @@ datagen.o: $(PROGDIR)/datagen.*
|
||||
|
||||
.PHONY: test clean
|
||||
|
||||
test: OptionsTest PzstdTest RoundTripTest
|
||||
test: OptionsTest PzstdTest
|
||||
@./OptionsTest$(EXT)
|
||||
@./PzstdTest$(EXT)
|
||||
|
||||
roundtrip: RoundTripTest
|
||||
@./RoundTripTest$(EXT)
|
||||
|
||||
clean:
|
||||
|
@ -7,9 +7,6 @@
|
||||
# of patent rights can be found in the PATENTS file in the same directory.
|
||||
# ##########################################################################
|
||||
|
||||
GTEST_INC ?= -isystem googletest/googletest/include
|
||||
GTEST_LIB ?= -L googletest/build/googlemock/gtest
|
||||
|
||||
# Define *.exe as extension for Windows systems
|
||||
ifneq (,$(filter Windows%,$(OS)))
|
||||
EXT =.exe
|
||||
@ -19,6 +16,10 @@ endif
|
||||
|
||||
PZSTDDIR = ../..
|
||||
|
||||
# Set GTEST_INC and GTEST_LIB to work with your install of gtest
|
||||
GTEST_INC ?= -isystem $(PZSTDDIR)/googletest/googletest/include
|
||||
GTEST_LIB ?= -L $(PZSTDDIR)/googletest/build/googlemock/gtest
|
||||
|
||||
CPPFLAGS = -I$(PZSTDDIR) $(GTEST_INC) $(GTEST_LIB)
|
||||
CFLAGS ?= -O3
|
||||
CFLAGS += -std=c++11
|
||||
|
Loading…
Reference in New Issue
Block a user