未验证 提交 3d407ab5 编写于 作者: H huili 提交者: GitHub

Merge pull request #5224 from taosdata/xiaoping/add_test_case

coverage test/CI: add start time for each case
......@@ -56,9 +56,9 @@ function runGeneralCaseOneByOne {
case=`echo $line | grep sim$ |awk '{print $NF}'`
if [ -n "$case" ]; then
./test.sh -f $case > /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
date +%F\ %T | tee -a $TDENGINE_COVERAGE_REPORT && ./test.sh -f $case > /dev/null 2>&1 && \
( grep -q 'script.*success.*m$' ../../sim/tsim/log/taoslog0.0 && 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
......
......@@ -64,7 +64,7 @@ function runQueryPerfTest {
[ -f $PERFORMANCE_TEST_REPORT ] && rm $PERFORMANCE_TEST_REPORT
nohup $WORK_DIR/TDengine/debug/build/bin/taosd -c /etc/taosperf/ > /dev/null 2>&1 &
echoInfo "Wait TDengine to start"
sleep 60
sleep 120
echoInfo "Run Performance Test"
cd $WORK_DIR/TDengine/tests/pytest
......@@ -72,7 +72,7 @@ function runQueryPerfTest {
python3 insert/insertFromCSVPerformance.py -c $LOCAL_COMMIT | tee -a $PERFORMANCE_TEST_REPORT
yes | taosdemo -c /etc/taosperf/ -d taosdemo_insert_test -t 1000 -n 1000 > taosdemoperf.txt
yes | taosdemo -c /etc/taosperf/ -d taosdemo_insert_test -x > taosdemoperf.txt
CREATETABLETIME=`grep 'Spent' taosdemoperf.txt | awk 'NR==1{print $2}'`
INSERTRECORDSTIME=`grep 'Spent' taosdemoperf.txt | awk 'NR==2{print $2}'`
......
......@@ -43,6 +43,22 @@ class TDTestCase:
tdSql.checkData(0, 6, None)
tdSql.checkData(1, 6, 'test')
# Test case for: https://jira.taosdata.com:18080/browse/TD-2423
tdSql.execute("create table stb(ts timestamp, col1 int, col2 nchar(20)) tags(tg1 int, tg2 binary(20), tg3 nchar(25))")
tdSql.execute("insert into tb1 using stb(tg1, tg3) tags(1, 'test1') values(now, 1, 'test1')")
tdSql.query("select *, tg1, tg2, tg3 from tb1")
tdSql.checkRows(1)
tdSql.checkData(0, 3, 1)
tdSql.checkData(0, 4, None)
tdSql.checkData(0, 5, 'test1')
tdSql.execute("create table tb2 using stb(tg3, tg2) tags('test3', 'test2')")
tdSql.query("select tg1, tg2, tg3 from tb2")
tdSql.checkRows(1)
tdSql.checkData(0, 0, None)
tdSql.checkData(0, 1, 'test2')
tdSql.checkData(0, 2, 'test3')
def stop(self):
tdSql.close()
tdLog.success("%s successfully executed" % __file__)
......
......@@ -22,7 +22,7 @@ function runSimCaseOneByOne {
case=`echo $line | grep sim$ |awk '{print $NF}'`
IN_TDINTERNAL="community"
start_time=`date +%s`
IN_TDINTERNAL="community"
date +%F\ %T | tee -a out.log
if [[ "$tests_dir" == *"$IN_TDINTERNAL"* ]]; then
echo -n $case
./test.sh -f $case > /dev/null 2>&1 && \
......@@ -53,6 +53,7 @@ function runSimCaseOneByOnefq {
start_time=`date +%s`
IN_TDINTERNAL="community"
date +%F\ %T | tee -a out.log
if [[ "$tests_dir" == *"$IN_TDINTERNAL"* ]]; then
echo -n $case
./test.sh -f $case > /dev/null 2>&1 && \
......@@ -94,6 +95,7 @@ function runPyCaseOneByOne {
case=`echo $line|awk '{print $NF}'`
fi
start_time=`date +%s`
date +%F\ %T | tee -a pytest-out.log
echo -n $case
$line > /dev/null 2>&1 && \
echo -e "${GREEN} success${NC}" | tee -a pytest-out.log || \
......@@ -122,6 +124,7 @@ function runPyCaseOneByOnefq {
case=`echo $line|awk '{print $NF}'`
fi
start_time=`date +%s`
date +%F\ %T | tee -a pytest-out.log
echo -n $case
$line > /dev/null 2>&1 && \
echo -e "${GREEN} success${NC}" | tee -a pytest-out.log || \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册