Browse Source

test shell

wecisecode 4 days ago
parent
commit
3f9a584d45
1 changed files with 6 additions and 1 deletions
  1. 6 1
      odbctest/mql/mqltest.sh

+ 6 - 1
odbctest/mql/mqltest.sh

@@ -36,7 +36,12 @@ if [[ "${keyspace}" != "" ]]; then
 fi
 fi
 sleep 2
 sleep 2
 
 
-mqlproc=`ps -ef | grep -v grep | grep mql | grep "basic$"`
+filepath=`echo "$@" | awk '{print $NF}'
+# remove ./
+filepath=${filepath/\.\//}
+# remove last slash
+filepath=${filepath%/}
+mqlproc=`ps -ef | grep -v grep | grep mql | grep "${filepath}"`
 if [[ "$mqlproc" != "" ]]; then
 if [[ "$mqlproc" != "" ]]; then
     echo "mql test is running"
     echo "mql test is running"
     exit 111
     exit 111