From 781b16b2ed0c51bdc44362ef69d1b71f558dc7b1 Mon Sep 17 00:00:00 2001 From: Ping Xiao Date: Wed, 12 Oct 2022 09:17:50 +0800 Subject: [PATCH] add TestNG cases into coverage test --- tests/perftest-scripts/coverage_test.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/perftest-scripts/coverage_test.sh b/tests/perftest-scripts/coverage_test.sh index 1be2053f24..b58fac21c9 100755 --- a/tests/perftest-scripts/coverage_test.sh +++ b/tests/perftest-scripts/coverage_test.sh @@ -64,6 +64,21 @@ function runGeneralCaseOneByOne { done < $1 } +function runTestNGCaseOneByOne { + while read -r line; do + if [[ $line =~ ^./taostest* ]]; then + case=`echo $line | cut -d' ' -f 3 | cut -d'=' -f 2` + yaml=`echo $line | cut -d' ' -f 2` + + if [ -n "$case" ]; then + date +%F\ %T | tee -a $TDENGINE_COVERAGE_REPORT && ./taostest $yaml --case=$case --keep > /dev/null 2>&1 && \ + echo -e "${GREEN}$case success${NC}" | tee -a $TDENGINE_COVERAGE_REPORT \ + || echo -e "${RED}$case failed${NC}" | tee -a $TDENGINE_COVERAGE_REPORT + fi + fi + done < $1 +} + function runTest { echo "run Test" @@ -87,6 +102,13 @@ function runTest { else sed -i '3i\\n' $TDENGINE_COVERAGE_REPORT fi + + # run TestNG cases + stopTaosd + $TDENGINE_DIR/debug/build/bin/taosd -c $TDENGINE_DIR/debug/test/cfg > /dev/null & + sleep 10 + cd $TDENGINE_DIR/../TestNG/cases + runTestNGCaseOneByOne ../scripts/cases.txt cd $TDENGINE_DIR/tests rm -rf ../sim -- GitLab