未验证 提交 3a295435 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #17308 from taosdata/test/TD-19422

test: add TestNG cases into coverage test
...@@ -64,6 +64,21 @@ function runGeneralCaseOneByOne { ...@@ -64,6 +64,21 @@ function runGeneralCaseOneByOne {
done < $1 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 { function runTest {
echo "run Test" echo "run Test"
...@@ -87,6 +102,13 @@ function runTest { ...@@ -87,6 +102,13 @@ function runTest {
else else
sed -i '3i\\n' $TDENGINE_COVERAGE_REPORT sed -i '3i\\n' $TDENGINE_COVERAGE_REPORT
fi 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 cd $TDENGINE_DIR/tests
rm -rf ../sim rm -rf ../sim
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册