Better check for failed tests

This commit is contained in:
alesapin 2020-07-29 14:39:08 +03:00
parent 26ff008898
commit 5c1aa52f40

View File

@ -110,19 +110,25 @@ kill_clickhouse () {
done
}
kill_clickhouse
clickhouse-server --config /etc/clickhouse-server/config.xml --daemon
until clickhouse-client --query "SELECT 1"
do
sleep 0.1
done
FAILED_TESTS=`grep 'FAIL\|TIMEOUT\|ERROR' /test_output/test_log.txt | awk 'BEGIN { ORS=" " }; { print substr($3, 1, length($3)-1) }'`
echo "Going to run again: $FAILED_TESTS"
clickhouse-test --no-long --testname --shard --zookeeper $FAILED_TESTS 2>&1 | ts '%Y-%m-%d %H:%M:%S' | tee -a /test_output/test_log.txt
if [[ ! -z "$FAILED_TESTS" ]]; then
kill_clickhouse
clickhouse-server --config /etc/clickhouse-server/config.xml --daemon
until clickhouse-client --query "SELECT 1"
do
sleep 0.1
done
echo "Going to run again: $FAILED_TESTS"
clickhouse-test --no-long --testname --shard --zookeeper $FAILED_TESTS 2>&1 | ts '%Y-%m-%d %H:%M:%S' | tee -a /test_output/test_log.txt
else
echo "No failed tests"
fi
mv /var/log/clickhouse-server/* /test_output