[Groonga-commit] groonga/groonga [master] test: take --protocol option

Back to archive index

null+****@clear***** null+****@clear*****
2012年 6月 13日 (水) 15:36:29 JST


Haruka Yoshihara	2012-06-13 15:36:29 +0900 (Wed, 13 Jun 2012)

  New Revision: c35ea285e49e270aaa98339ba315bab2843cc2eb

  Log:
    test: take --protocol option

  Modified files:
    test/function/run-test.sh

  Modified: test/function/run-test.sh (+25 -0)
===================================================================
--- test/function/run-test.sh    2012-06-13 14:54:28 +0900 (991e740)
+++ test/function/run-test.sh    2012-06-13 15:36:29 +0900 (9a0fa75)
@@ -1,5 +1,25 @@
 #!/bin/sh
 
+OPTIONS=`getopt -n $0 -u -o " " -l protocol: -- "$@"`
+if test $? -ne 0; then
+    exit 1
+fi
+set -- $OPTIONS
+while true;
+do
+    case $1 in
+	--protocol)
+	    protocol=$2
+	    shift
+            ;;
+	--)
+	    shift
+	    break
+	    ;;
+    esac
+    shift
+done
+
 export BASE_DIR="`dirname $0`"
 if test -z "$BUILD_DIR"; then
     BUILD_DIR="$BASE_DIR"
@@ -56,9 +76,14 @@ else
     targets=
 fi
 
+if test -z $protocol; then
+    protocol="gqtp"
+fi
+
 $RUBY -I "$grntest_dir/lib" \
     "$grntest_dir/bin/grntest" \
     --groonga "$GROONGA" \
     --groonga-suggest-create-dataset "$GROONGA_SUGGEST_CREATE_DATASET" \
     --base-directory "$BASE_DIR" \
+    --protocol "$protocol" \
     "$targets" "$@"




Groonga-commit メーリングリストの案内
Back to archive index