From d6640af67c0a66c8297735784831a6bce3d82890 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Mon, 11 May 2020 12:02:48 +0800 Subject: [PATCH 1/3] reduce testcase less to reduce smoketest time. --- .travis.yml | 2 +- tests/pytest/smoketest.sh | 71 ----------------------------------- tests/pytest/valgrind-test.sh | 45 ++++++++++++++++++++++ 3 files changed, 46 insertions(+), 72 deletions(-) create mode 100755 tests/pytest/valgrind-test.sh diff --git a/.travis.yml b/.travis.yml index 2cb7b8e966..486844a7a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,7 +49,7 @@ matrix: ./test-all.sh $TRAVIS_EVENT_TYPE || travis_terminate $? cd ${TRAVIS_BUILD_DIR}/tests/pytest - ./smoketest.sh -g 2>&1 | tee mem-error-out.txt + ./valgrind-test.sh -g 2>&1 | tee mem-error-out.txt sleep 1 # Color setting diff --git a/tests/pytest/smoketest.sh b/tests/pytest/smoketest.sh index e51e8792ec..853ebe1d76 100755 --- a/tests/pytest/smoketest.sh +++ b/tests/pytest/smoketest.sh @@ -29,88 +29,17 @@ python3 ./test.py $1 -s && sleep 1 python3 ./test.py $1 -f table/db_table.py python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importDataLastTO.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importDataLastT.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importDataTO.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importDataT.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importHeadOverlap.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importHeadPartOverlap.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importHORestart.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importHPORestart.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importHRestart.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importLastSub.py -python3 ./test.py $1 -s && sleep 1 - -python3 ./test.py $1 -f import_merge/importBlock1HO.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importBlock1HPO.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importBlock1H.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importBlock1S.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importBlock1Sub.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importBlock1TO.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importBlock1TPO.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importBlock1T.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importBlock2HO.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importBlock2HPO.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importBlock2H.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importBlock2S.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importBlock2Sub.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importBlock2TO.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importBlock2TPO.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importBlock2T.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importBlockbetween.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importCacheFileSub.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importCacheFileTO.py -python3 ./test.py $1 -s && sleep 1 python3 ./test.py $1 -f import_merge/importCacheFileT.py python3 ./test.py $1 -s && sleep 1 python3 ./test.py $1 -f import_merge/importDataLastSub.py python3 ./test.py $1 -s && sleep 1 python3 ./test.py $1 -f import_merge/importHead.py python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importLastTO.py -python3 ./test.py $1 -s && sleep 1 python3 ./test.py $1 -f import_merge/importLastT.py python3 ./test.py $1 -s && sleep 1 python3 ./test.py $1 -f import_merge/importSpan.py python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importSRestart.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importSubRestart.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importTailOverlap.py -python3 ./test.py $1 -s && sleep 1 python3 ./test.py $1 -f import_merge/importTail.py python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importTORestart.py -python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importTPORestart.py -python3 ./test.py $1 -s && sleep 1 python3 ./test.py $1 -f import_merge/importTRestart.py python3 ./test.py $1 -s && sleep 1 diff --git a/tests/pytest/valgrind-test.sh b/tests/pytest/valgrind-test.sh new file mode 100755 index 0000000000..853ebe1d76 --- /dev/null +++ b/tests/pytest/valgrind-test.sh @@ -0,0 +1,45 @@ +#!/bin/bash +python3 ./test.py $1 -f insert/basic.py +python3 ./test.py $1 -s && sleep 1 +python3 ./test.py $1 -f insert/int.py +python3 ./test.py $1 -s && sleep 1 +python3 ./test.py $1 -f insert/float.py +python3 ./test.py $1 -s && sleep 1 +python3 ./test.py $1 -f insert/bigint.py +python3 ./test.py $1 -s && sleep 1 +python3 ./test.py $1 -f insert/bool.py +python3 ./test.py $1 -s && sleep 1 +python3 ./test.py $1 -f insert/double.py +python3 ./test.py $1 -s && sleep 1 +python3 ./test.py $1 -f insert/smallint.py +python3 ./test.py $1 -s && sleep 1 +python3 ./test.py $1 -f insert/tinyint.py +python3 ./test.py $1 -s && sleep 1 +python3 ./test.py $1 -f insert/binary.py +python3 ./test.py $1 -s && sleep 1 +python3 ./test.py $1 -f insert/date.py +python3 ./test.py $1 -s && sleep 1 +python3 ./test.py $1 -f insert/nchar.py +python3 ./test.py $1 -s && sleep 1 + +python3 ./test.py $1 -f table/column_name.py +python3 ./test.py $1 -s && sleep 1 +python3 ./test.py $1 -f table/column_num.py +python3 ./test.py $1 -s && sleep 1 +python3 ./test.py $1 -f table/db_table.py +python3 ./test.py $1 -s && sleep 1 + +python3 ./test.py $1 -f import_merge/importCacheFileT.py +python3 ./test.py $1 -s && sleep 1 +python3 ./test.py $1 -f import_merge/importDataLastSub.py +python3 ./test.py $1 -s && sleep 1 +python3 ./test.py $1 -f import_merge/importHead.py +python3 ./test.py $1 -s && sleep 1 +python3 ./test.py $1 -f import_merge/importLastT.py +python3 ./test.py $1 -s && sleep 1 +python3 ./test.py $1 -f import_merge/importSpan.py +python3 ./test.py $1 -s && sleep 1 +python3 ./test.py $1 -f import_merge/importTail.py +python3 ./test.py $1 -s && sleep 1 +python3 ./test.py $1 -f import_merge/importTRestart.py +python3 ./test.py $1 -s && sleep 1 From 8fd8af68940aef3accf73d0f70bc72b2ab5b331b Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Mon, 11 May 2020 12:18:36 +0800 Subject: [PATCH 2/3] make fulltest.sh exit after upload coverage report. --- .travis.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 486844a7a9..b460ad05b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -163,11 +163,9 @@ matrix: cd ${TRAVIS_BUILD_DIR}/tests - ./test-all.sh + ./test-all.sh $TRAVIS_EVENT_TYPE - if [ "$?" -ne "0" ]; then - travis_terminate $? - fi + TEST_RESULT=$? pkill taosd sleep 1 @@ -199,6 +197,9 @@ matrix: echo -e "${RED} ## Codecov did not collect coverage report! ## ${NC} " fi + if [ "$TEST_RESULT" -ne "0" ]; then + travis_terminate $? + fi ;; esac From 5883ed6e7344b34018c9c09fb5019a9133cb91e5 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Mon, 11 May 2020 13:52:08 +0800 Subject: [PATCH 3/3] sleep 4 sec to wait dnodes start. --- tests/pytest/util/dnodes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/pytest/util/dnodes.py b/tests/pytest/util/dnodes.py index e492a35c20..23adab2c47 100644 --- a/tests/pytest/util/dnodes.py +++ b/tests/pytest/util/dnodes.py @@ -201,8 +201,8 @@ class TDDnode: self.running = 1 tdLog.debug("dnode:%d is running with %s " % (self.index, cmd)) - tdLog.debug("wait 2 seconds for the dnode:%d to start." % (self.index)) - time.sleep(2) + tdLog.debug("wait 4 seconds for the dnode:%d to start." % (self.index)) + time.sleep(4) def stop(self): if self.valgrind == 0: