update jdbc.sh
This commit is contained in:
parent
32b9b1e969
commit
0b9d6e2075
|
@ -1,4 +1,5 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
pgrep taosd || taosd >> /dev/null 2>&1 &
|
||||
pgrep taosadapter || taosadapter >> /dev/null 2>&1 &
|
||||
|
@ -7,15 +8,11 @@ cd ../../docs/examples/java
|
|||
mvn clean test > jdbc-out.log 2>&1
|
||||
tail -n 20 jdbc-out.log
|
||||
|
||||
if grep -q "BUILD FAILURE" jdbc-out.log; then
|
||||
exit 8
|
||||
fi
|
||||
|
||||
totalJDBCCases=`grep 'Tests run' jdbc-out.log | awk -F"[:,]" 'END{ print $2 }'`
|
||||
failed=`grep 'Tests run' jdbc-out.log | awk -F"[:,]" 'END{ print $4 }'`
|
||||
error=`grep 'Tests run' jdbc-out.log | awk -F"[:,]" 'END{ print $6 }'`
|
||||
totalJDBCFailed=`expr $failed + $error`
|
||||
totalJDBCSuccess=`expr $totalJDBCCases - $totalJDBCFailed`
|
||||
totalJDBCFailed=$((failed + error))
|
||||
totalJDBCSuccess=$((totalJDBCCases - totalJDBCFailed))
|
||||
|
||||
if [ "$totalJDBCSuccess" -gt "0" ]; then
|
||||
echo -e "\n${GREEN} ### Total $totalJDBCSuccess JDBC case(s) succeed! ### ${NC}"
|
||||
|
|
Loading…
Reference in New Issue