singa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kaip...@apache.org
Subject [2/2] incubator-singa git commit: SINGA-95 Add make test after building
Date Wed, 21 Oct 2015 08:50:49 GMT
SINGA-95 Add make test after building

Add a new target named "test". Users just run "make test" and the system will finish the compilation
and execution of the test.


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

Branch: refs/heads/master
Commit: 152e47346b2292ea637f0cb00e07d69e1ff9e6f5
Parents: 7c50e03
Author: xiezl <xiezhongle@comp.nus.edu.sg>
Authored: Tue Oct 20 18:20:41 2015 +0800
Committer: xiezl <xiezhongle@comp.nus.edu.sg>
Committed: Wed Oct 21 16:30:27 2015 +0800

----------------------------------------------------------------------
 Makefile.am  | 9 ++++++---
 configure.ac | 2 +-
 2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/152e4734/Makefile.am
----------------------------------------------------------------------
diff --git a/Makefile.am b/Makefile.am
index 6e02c6a..c701650 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -122,7 +122,7 @@ TEST_SRCS := include/gtest/gtest_main.cc \
 						 src/test/test_csv_input_layer.cc
 
 #EXTRA_PROGRAMS = $(PROGS)
-EXTRA_PROGRAMS = singatest
+EXTRA_PROGRAMS = singatest test
 #EXTRA_LTLIBRARIES = $(LTLIBS)
 EXTRA_LTLIBRARIES = libgtest.la
 
@@ -172,7 +172,7 @@ libgtest_la_CXXFLAGS += -DUSE_LMDB
 endif
 libgtest_la_LDFLAGS = -I./include
 
-#bin_PROGRAMS += singatest
+#bin_PROGRAMS += test
 
 singatest_SOURCES = $(GTEST_HDRS) $(TEST_SRCS)
 singatest_CXXFLAGS = $(DEFAULT_FLAGS)
@@ -185,7 +185,7 @@ singatest_LDFLAGS = -I./include \
                 -lzmq \
                 -lczmq \
                 -lzookeeper_mt \
-								-lgtest
+			    -lgtest
 if LMDB
 singatest_LDFLAGS += -llmdb
 endif
@@ -208,6 +208,9 @@ rat:
 		echo "java is not found"; \
 	fi
 
+test: singatest
+	@./singatest
+
 $(PROTO_HDRS) $(PROTO_SRCS): $(PROTOS)
 	protoc --proto_path=$(top_srcdir)/src/proto --cpp_out=$(top_srcdir)/src/proto $(PROTOS)
 	mkdir -p $(top_srcdir)/tool/pb2/

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/152e4734/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 65068ba..89dac99 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,7 +68,7 @@ AC_ARG_ENABLE(test,
 	[enable_test=yes],[enable_test=no])
 AM_CONDITIONAL(SINGATEST, test "$enable_test" = yes)
 if test x"$enable_test" != x"no"; then
-	PROGS='singatest'
+	PROGS='singatest test'
 	LTLIBS='libgtest.la'
 else
 	PROGS=''


Mime
View raw message