jonnxu commented on a change in pull request #23: integration Googletest
URL: https://github.com/apache/rocketmq-client-cpp/pull/23#discussion_r239681910
##########
File path: build.sh
##########
@@ -14,59 +14,76 @@ fname_boost_down="1.58.0/boost_1_58_0.tar.gz"
PrintParams()
{
echo "=========================================one key build
help============================================"
- echo "sh build.sh [build libevent:0/1 default:1] [build json:0/1
default:1] [build boost:0/1 default:1]"
- echo "usage: sh build.sh 1 1 1"
- echo "[[build libevent]: 1: need build libevent lib, 0: no need build
libevent lib; default:1]"
- echo "[[build json]: 1: need build json lib, 0: no need build json lib;
default:1]"
- echo "[[build boost]: 1: need build boost lib, 0: no need build boost lib;
default:1]"
+ echo "sh build.sh [no build libevent:noEvent] [no build json:noJson] [no
build boost:noBoost] [ execution test :test]"
+ echo "usage: sh build.sh noJson noEvent noBoost test"
+ echo "usage: sh build.sh onlytest == sh build.sh noJson noEvent noBoost
test"
echo "=========================================one key build
help============================================"
echo ""
}
-if [ $# -eq 3 ];then
- if [ "$1" != "0" -a "$1" != "1" ];then
- echo "unsupport para value $1, please see the help"
- Help
- exit 1
- fi
- if [ "$2" != "0" -a "$2" != "1" ];then
- echo "unsupport para value $2, please see the help"
- Help
- exit 1
- fi
- if [ "$3" != "0" -a "$3" != "1" ];then
- echo "unsupport para value $3, please see the help"
- Help
- exit 1
- fi
-elif [ $# -gt 0 ];then
- echo "the number of parameter must 0 or 3, please see the help"
- Help
- exit 1
-fi
-
-if [ $# -ge 1 ];then
- need_build_libevent=$1
-else
- need_build_libevent=1
-fi
-
-if [ $# -ge 2 ];then
- need_build_jsoncpp=$2
-else
- need_build_jsoncpp=1
-fi
-
-if [ $# -ge 3 ];then
- need_build_boost=$3
-else
- need_build_boost=1
-fi
+need_build_jsoncpp=1
+need_build_libevent=1
+need_build_boost=1
+need_build_test=0
+
+pasres_arguments(){
+ for var in "$@"
+ do
+ case "$var" in
+ noJson)
+ need_build_jsoncpp=0
+ ;;
+ noEvent)
+ need_build_libevent=0
+ ;;
+ noBoost)
+ need_build_boost=0
+ ;;
+ test)
+ need_build_test=1
+ ;;
+ onlytest)
Review comment:
onlytest and test need merge to one, no need two different parameter
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services