hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject incubator-hawq git commit: HAWQ-734. Refactor feature test build and some bugfix
Date Mon, 16 May 2016 06:36:24 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 1f794e2b3 -> c66d69e81


HAWQ-734. Refactor feature test build and some bugfix


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/c66d69e8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/c66d69e8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/c66d69e8

Branch: refs/heads/master
Commit: c66d69e81d7efdbb0e16f1f3113c55d5b235299f
Parents: 1f794e2
Author: xunzhang <xunzhangthu@gmail.com>
Authored: Mon May 16 11:46:04 2016 +0800
Committer: xunzhang <xunzhangthu@gmail.com>
Committed: Mon May 16 14:21:05 2016 +0800

----------------------------------------------------------------------
 src/test/feature/Makefile      | 28 ++++++++++++----------------
 src/test/feature/lib/Makefile  | 17 ++++++++++-------
 src/test/feature/test-main.cpp |  1 -
 3 files changed, 22 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/c66d69e8/src/test/feature/Makefile
----------------------------------------------------------------------
diff --git a/src/test/feature/Makefile b/src/test/feature/Makefile
index cb7c60f..c3a122a 100644
--- a/src/test/feature/Makefile
+++ b/src/test/feature/Makefile
@@ -1,32 +1,28 @@
 top_builddir = ../../..
 include $(top_builddir)/src/Makefile.global
 
-#.DEFAULT:
-#$(MAKE) -C lib $@
-
-include $(top_builddir)/src/Makefile.global
-
-gtest_include = $(top_builddir)/depends/thirdparty/googletest/googletest/include
-gmock_include = $(top_builddir)/depends/thirdparty/googletest/googlemock/include
-gtest_lib_path = $(top_builddir)/depends/thirdparty/googletest/build/googlemock
-gmock_lib_path = $(top_builddir)/depends/thirdparty/googletest/build/googlemock/gtest
+gtest_include = $(abs_top_srcdir)/depends/thirdparty/googletest/googletest/include
+gmock_include = $(abs_top_srcdir)/depends/thirdparty/googletest/googlemock/include
+gtest_lib_path = $(abs_top_srcdir)/depends/thirdparty/googletest/build/googlemock
+gmock_lib_path = $(abs_top_srcdir)/depends/thirdparty/googletest/build/googlemock/gtest
 
+override CXX = g++
 override CXXFLAGS = -Wall -O0 -g -std=c++11
-override CPPFLAGS := -I/usr/include -I/usr/local/include -I/usr/include/libxml2 -I$(top_builddir)/src/test/feature/
-I$(top_builddir)/src/test/feature/lib/ -I$(top_builddir)/src/interfaces/libpq -I$(top_builddir)/src/interfaces
-I$(top_builddir)/src/include  -I$(gtest_include) -I$(gmock_include)
-
+override CPPFLAGS := -I/usr/include -I/usr/local/include -I/usr/include/libxml2 -I$(abs_top_srcdir)/src/test/feature/
-I$(abs_top_srcdir)/src/test/feature/lib/ -I$(abs_top_srcdir)/src/interfaces/libpq -I$(abs_top_srcdir)/src/interfaces
-I$(abs_top_srcdir)/src/include  -I$(gtest_include) -I$(gmock_include)
 override LIBS := $(LIBS) -lgtest -lpq -lxml2 -ltest
-override LDFLAGS += -L/usr/local/lib -L/usr/lib -L$(top_builddir)/src/test/feature/lib -L$(gtest_lib_path)
-L$(gmock_lib_path)
+override LDFLAGS += -L/usr/local/lib -L/usr/lib -L$(abs_top_srcdir)/src/test/feature/lib
-L$(gtest_lib_path) -L$(gmock_lib_path)
 
-PROG = test-main.cpp testlib/test-lib.cpp
+PROG = test-main.cpp $(wildcard */*.cpp)
+RM = rm -rf
 
 .PHONY: all distclean  clean
 
 all:
 	$(MAKE) -C lib all
-	g++ $(CPPFLAGS) $(CXXFLAGS) $(PROG) $(LDFLAGS) $(LIBS) -o feature-test
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(PROG) $(LDFLAGS) $(LIBS) -o feature-test
 
 clean distclean:
-	rm -f feature-test
-	rm -rf feature-test.dSYM
+	$(RM) feature-test
+	$(RM) feature-test.dSYM
 	$(MAKE) -C lib clean
 	

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/c66d69e8/src/test/feature/lib/Makefile
----------------------------------------------------------------------
diff --git a/src/test/feature/lib/Makefile b/src/test/feature/lib/Makefile
index afe2aa8..3e990d8 100644
--- a/src/test/feature/lib/Makefile
+++ b/src/test/feature/lib/Makefile
@@ -1,25 +1,28 @@
 subdir = src/test/feature/lib
 top_builddir = ../../../..
 include $(top_builddir)/src/Makefile.global
+
 gtest_include = $(top_builddir)/depends/thirdparty/googletest/googletest/include
 gmock_include = $(top_builddir)/depends/thirdparty/googletest/googlemock/include
 gtest_lib_path = $(top_builddir)/depends/thirdparty/googletest/build/googlemock
 gmock_lib_path = $(top_builddir)/depends/thirdparty/googletest/build/googlemock/gtest
 
+override CXX = g++
 override CXXFLAGS = -Wall -O0 -g -c -std=c++11
 override CPPFLAGS := -I/usr/include -I/usr/local/include -I/usr/include/libxml2 -I$(top_builddir)/src/interfaces/libpq
-I$(top_builddir)/src/interfaces -I$(top_builddir)/src/include -I$(gtest_include) -I$(gmock_include)
-
 override LIBS := $(LIBS) -lpq -lxml2
 override LDFLAGS += -L/usr/local/lib -L/usr/lib -L$(gtest_lib_path) -L$(gmock_lib_path)
 
-PROG = $(abspath string-util.cpp psql.cpp command.cpp xml-parser.cpp hawq-config.cpp sql-util.cpp
data-gen.cpp)
+PROG = $(abspath $(wildcard *.cpp))
+AR = ar -r
+RM = rm -rf
 
 all:
-	g++ $(CPPFLAGS) $(CXXFLAGS) $(PROG) 
-	ar -r libtest.a  *.o
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(PROG) 
+	$(AR) libtest.a  *.o
 
 distclean clean:
-	rm -f libtest.a
-	rm -f *.o
+	$(RM) libtest.a
+	$(RM) *.o
 
-.PHONY: all distclean  clean
+.PHONY: all distclean clean

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/c66d69e8/src/test/feature/test-main.cpp
----------------------------------------------------------------------
diff --git a/src/test/feature/test-main.cpp b/src/test/feature/test-main.cpp
index 9347288..70e0f53 100644
--- a/src/test/feature/test-main.cpp
+++ b/src/test/feature/test-main.cpp
@@ -1,4 +1,3 @@
-
 #include "gtest/gtest.h"
 
 int main(int argc, char** argv) {


Mime
View raw message