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