Before running regression test clean the remaining processes and sockets.
authorBo Peng <pengbo@sraoss.co.jp>
Thu, 13 Aug 2020 06:35:34 +0000 (15:35 +0900)
committerBo Peng <pengbo@sraoss.co.jp>
Thu, 13 Aug 2020 06:38:13 +0000 (15:38 +0900)
src/test/regression/libs.sh
src/test/regression/regress.sh

index f7aeaad956035f43ea4b8da1ed5b28ddb8e4be98..f0e5939c249b96236d15109884ca79eb64786c55 100644 (file)
@@ -35,3 +35,12 @@ function wait_for_failover_done {
                sleep 1
        done
 }
+
+#-------------------------------------------
+# clean remaining processes and sockets
+#-------------------------------------------
+function clean_all {
+       pgrep pgpool | xargs kill -9 > /dev/null 2>&1
+       pgrep postgres | xargs kill -9 > /dev/null 2>&1
+       rm -f $PGSOCKET_DIR/.s.PGSQL.*
+}
index ea9b5c0f33f1b091833553e0c1860ea9521cd833..07732d84e56b9a002692a557c244f3dc99274eb6 100755 (executable)
@@ -173,6 +173,7 @@ fi
 verify_pginstallation
 export_env_vars
 print_info
+source $TESTLIBS
 
 #Start executing tests
 rm -fr $log
@@ -190,6 +191,7 @@ for i in $dirs
 do
        cd $i
        echo -n "testing $i..."
+       clean_all
        timeout $TIMEOUT ./test.sh > $log/$i 2>&1
        rtn=$?
        if [ $rtn = 0 ];then