提交 3a8035c6 编写于 作者: W Wu Tao 提交者: QinZuoyan

scripts: add shell option --disable_gperf and install tests in builder/bin (#188)

上级 ee7e730e
Subproject commit 0b6b42d045ce34db7159af77fc9defc16323514f
Subproject commit 9fdc118cd0b8bc7abd1a2a6d9426c846f71481ef
......@@ -69,6 +69,8 @@ function usage_build()
echo " -w|--warning_all open all warnings when building, default no"
echo " --enable_gcov generate gcov code coverage report, default no"
echo " -v|--verbose build in verbose mode, default no"
echo " --disable_gperf build without gperftools, this flag is mainly used"
echo " to enable valgrind memcheck, default no"
}
function run_build()
{
......@@ -132,6 +134,10 @@ function run_build()
-v|--verbose)
RUN_VERBOSE=YES
;;
--disable_gperf)
DISABLE_GPERF=YES
shift
;;
*)
echo "ERROR: unknown option \"$key\""
echo
......@@ -183,6 +189,9 @@ function run_build()
if [ "$ENABLE_GCOV" == "YES" ]; then
OPT="$OPT --enable_gcov"
fi
if [ "$DISABLE_GPERF" == "YES" ]; then
OPT="$OPT --disable_gperf"
fi
./run.sh build $OPT --notest
if [ $? -ne 0 ]; then
echo "ERROR: build rdsn failed"
......@@ -266,7 +275,7 @@ function run_build()
C_COMPILER="$C_COMPILER" CXX_COMPILER="$CXX_COMPILER" BUILD_TYPE="$BUILD_TYPE" \
CLEAR="$CLEAR" PART_CLEAR="$PART_CLEAR" JOB_NUM="$JOB_NUM" \
BOOST_DIR="$BOOST_DIR" WARNING_ALL="$WARNING_ALL" ENABLE_GCOV="$ENABLE_GCOV" \
RUN_VERBOSE="$RUN_VERBOSE" TEST_MODULE="$TEST_MODULE" ./build.sh
RUN_VERBOSE="$RUN_VERBOSE" TEST_MODULE="$TEST_MODULE" DISABLE_GPERF="$DISABLE_GPERF" ./build.sh
if [ $? -ne 0 ]; then
echo "ERROR: build pegasus failed"
exit 1
......
......@@ -17,4 +17,4 @@ set(MY_BOOST_PACKAGES system filesystem)
set(MY_BINPLACES "config.ini")
dsn_add_executable()
dsn_add_test()
......@@ -79,6 +79,15 @@ else
echo "ENABLE_GCOV=NO"
fi
# valgrind can not work together with gpertools
# you may want to use this option when you want to run valgrind
if [ "$DISABLE_GPERF" == "YES" ]
echo "DISABLE_GPERF=YES"
CMAKE_OPTIONS="$CMAKE_OPTIONS -DENABLE_GPERF=Off"
then
echo "DISABLE_GPERF=NO"
fi
# You can specify customized boost by defining BOOST_DIR.
# Install boost like this:
# wget http://downloads.sourceforge.net/project/boost/boost/1.54.0/boost_1_54_0.zip?r=&ts=1442891144&use_mirror=jaist
......
......@@ -24,4 +24,4 @@ add_definitions(-Wno-attributes)
set(MY_BINPLACES "config.ini")
dsn_add_executable()
dsn_add_test()
......@@ -32,4 +32,4 @@ set(MY_BINPLACES "config.ini" "run.sh")
add_compile_options("-Wno-dangling-else")
add_definitions(-Wno-attributes)
dsn_add_executable()
dsn_add_test()
......@@ -44,4 +44,4 @@ set(MY_BOOST_PACKAGES system filesystem regex)
set(MY_BINPLACES config.ini run.sh)
dsn_add_executable()
dsn_add_test()
......@@ -27,3 +27,4 @@ set(MY_BOOST_PACKAGES system filesystem)
set(MY_BINPLACES "config.ini")
dsn_add_executable()
dsn_install_executable()
......@@ -32,4 +32,4 @@ set(MY_PROJ_LIB_PATH "../..")
set(MY_BINPLACES "config.ini" "run.sh")
dsn_add_executable()
dsn_add_test()
......@@ -27,4 +27,4 @@ if (UNIX)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
endif()
dsn_add_executable()
dsn_add_test()
......@@ -25,4 +25,4 @@ if (UNIX)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
endif()
dsn_add_executable()
dsn_add_test()
......@@ -26,4 +26,4 @@ if (UNIX)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
endif()
dsn_add_executable()
dsn_add_test()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册