wecisecode 1 週間 前
コミット
ee83fe06a4
2 ファイル変更13 行追加5 行削除
  1. 9 1
      odbctest/mql/mqltest.sh
  2. 4 4
      odbctest/mql/oktest.sh

+ 9 - 1
odbctest/mql/mqltest.sh

@@ -64,7 +64,15 @@ if [[ -e ${logfile} ]]; then
     mv -f ${logfile} ${lastlogfile}
 fi
 
-./mql "$@" 2>&1 | tee ${logfile}
+n=`./mql keyspace=matrix - "cql:select count(*) from system_schema.columns where keyspace_name='${keyspace}' and table_name='object_test'" 2>/dev/null | grep "count" | grep -v "grep" | grep -v "select" | awk '{print $2}'`
+if [[ "${n}" == "0" ]]; then
+    n=1
+else
+    n=`cat ${keyspace}.test.count 2>/dev/null`
+    n=`expr 0${n} + 1`
+fi
+echo "${n}" > ${keyspace}.test.count
+./mql "$@" "log.prefix=test $n" 2>&1 | tee ${logfile}
 lastline=`tail -n 1 $logfile 2>&1`
 if [[ "$lastline" = "FAIL" ]]; then
     exit 123

+ 4 - 4
odbctest/mql/oktest.sh

@@ -76,20 +76,20 @@ while [[ true ]]; do
     fi 
     if [[ "$n" != "0" ]]; then
         cd "$CWD"
-        PREFIX="test $n"
+        PROCFLAG="test$n"
         endflag="$odbserver end of test $n return"
         ttt=`date +'%Y%m%d%H%M%S'`
         check_odbserver() {
             sleep 10
             while true; do
-                mqlproc=`ps -ef | grep -v grep | grep mql | grep "log.prefix=${PREFIX}"`
+                mqlproc=`ps -ef | grep -v grep | grep mql | grep "proc.flag=${PROCFLAG}"`
                 if [[ "$mqlproc" == "" ]]; then
                     return 0
                 fi
                 if [[ -e ~/odbserver/odbserver ]]; then
                     odbserver=`~/odbserver/odbserver -version`
                     if [[ "$odbserver" != "$last_odbserver" ]]; then
-                        ps -ef | grep -v grep | grep mql | grep "log.prefix=${PREFIX}" | awk '{print $2}' | xargs kill -9
+                        ps -ef | grep -v grep | grep mql | grep "proc.flag=${PROCFLAG}" | awk '{print $2}' | xargs kill -9
                         return 0
                     fi
                 fi
@@ -97,7 +97,7 @@ while [[ true ]]; do
             done
         }
         run() {
-            ./mqltest.sh "log.prefix=${PREFIX}" "$@"
+            ./mqltest.sh "proc.flag=${PROCFLAG}" "$@"
             ret=$?
             echo "$endflag $ret" >> $logfile
             if [[ "$ret" = "0" ]]; then