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
|
*.idea
|
||||||
*.swp
|
*.swp
|
||||||
.DS_Store
|
.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
|
pzstd: libzstd.a Pzstd.o SkippableFrame.o Options.o main.o
|
||||||
$(CXX) $(FLAGS) $^ -o $@$(EXT)
|
$(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
|
test: libzstd.a Pzstd.o Options.o SkippableFrame.o
|
||||||
$(MAKE) -C utils/test test
|
$(MAKE) -C utils/test test
|
||||||
$(MAKE) -C test test
|
$(MAKE) -C test test
|
||||||
@ -67,5 +72,5 @@ clean:
|
|||||||
$(MAKE) -C $(ZSTDDIR) clean
|
$(MAKE) -C $(ZSTDDIR) clean
|
||||||
$(MAKE) -C utils/test clean
|
$(MAKE) -C utils/test clean
|
||||||
$(MAKE) -C test clean
|
$(MAKE) -C test clean
|
||||||
@$(RM) libzstd.a *.o pzstd$(EXT)
|
@$(RM) -rf googletest/ libzstd.a *.o pzstd$(EXT)
|
||||||
@echo Cleaning completed
|
@echo Cleaning completed
|
||||||
|
@ -7,10 +7,6 @@
|
|||||||
# of patent rights can be found in the PATENTS file in the same directory.
|
# 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
|
# Define *.exe as extension for Windows systems
|
||||||
ifneq (,$(filter Windows%,$(OS)))
|
ifneq (,$(filter Windows%,$(OS)))
|
||||||
EXT =.exe
|
EXT =.exe
|
||||||
@ -22,6 +18,10 @@ PZSTDDIR = ..
|
|||||||
PROGDIR = ../../../programs
|
PROGDIR = ../../../programs
|
||||||
ZSTDDIR = ../../../lib
|
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)
|
CPPFLAGS = -I$(PZSTDDIR) $(GTEST_INC) $(GTEST_LIB) -I$(ZSTDDIR)/common -I$(PROGDIR)
|
||||||
|
|
||||||
CFLAGS ?= -O3
|
CFLAGS ?= -O3
|
||||||
@ -37,9 +37,11 @@ datagen.o: $(PROGDIR)/datagen.*
|
|||||||
|
|
||||||
.PHONY: test clean
|
.PHONY: test clean
|
||||||
|
|
||||||
test: OptionsTest PzstdTest RoundTripTest
|
test: OptionsTest PzstdTest
|
||||||
@./OptionsTest$(EXT)
|
@./OptionsTest$(EXT)
|
||||||
@./PzstdTest$(EXT)
|
@./PzstdTest$(EXT)
|
||||||
|
|
||||||
|
roundtrip: RoundTripTest
|
||||||
@./RoundTripTest$(EXT)
|
@./RoundTripTest$(EXT)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@ -7,9 +7,6 @@
|
|||||||
# of patent rights can be found in the PATENTS file in the same directory.
|
# 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
|
# Define *.exe as extension for Windows systems
|
||||||
ifneq (,$(filter Windows%,$(OS)))
|
ifneq (,$(filter Windows%,$(OS)))
|
||||||
EXT =.exe
|
EXT =.exe
|
||||||
@ -19,6 +16,10 @@ endif
|
|||||||
|
|
||||||
PZSTDDIR = ../..
|
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)
|
CPPFLAGS = -I$(PZSTDDIR) $(GTEST_INC) $(GTEST_LIB)
|
||||||
CFLAGS ?= -O3
|
CFLAGS ?= -O3
|
||||||
CFLAGS += -std=c++11
|
CFLAGS += -std=c++11
|
||||||
|
Loading…
Reference in New Issue
Block a user