diff --git a/.travis.yml b/.travis.yml index b460ad05b049a6fa5ddd043a7682d81f3abc947f..a86f2463e9f23b680748b7dd513eec4d5972e1e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -115,7 +115,7 @@ matrix: # The command that will be added as an argument to "cov-build" to compile your project for analysis, # ** likely specific to your build ** - build_command: make > /dev/null + build_command: make # Pattern to match selecting branches that will run analysis. We recommend leaving this set to 'coverity_scan'. # Take care in resource usage, and consider the build frequency allowances per @@ -163,7 +163,7 @@ matrix: cd ${TRAVIS_BUILD_DIR}/tests - ./test-all.sh $TRAVIS_EVENT_TYPE + ./test-all.sh $TRAVIS_EVENT_TYPE COVER TEST_RESULT=$? diff --git a/tests/pytest/import_merge/importDataH2.py b/tests/pytest/import_merge/importDataH2.py index 73a412fb8046ff1f6baf9c42d39221345c22fbee..b5e53d862e75935a66303f096374374a298b6a25 100644 --- a/tests/pytest/import_merge/importDataH2.py +++ b/tests/pytest/import_merge/importDataH2.py @@ -46,16 +46,16 @@ class TDTestCase: self.maxrows) tdLog.info("================= step2") - tdLog.info("import %d sequential data" % (self.maxrows / 2)) + tdLog.info("import %d sequential data" % (self.maxrows // 2)) startTime = self.startTime sqlcmd = ['import into tb1 values'] - for rid in range(1, self.maxrows / 2 + 1): + for rid in range(1, self.maxrows // 2 + 1): sqlcmd.append('(%ld, %d)' % (startTime + rid, rid)) tdSql.execute(" ".join(sqlcmd)) tdLog.info("================= step3") tdSql.query('select * from tb1') - tdSql.checkRows(self.maxrows / 2) + tdSql.checkRows(self.maxrows // 2) tdLog.info("================= step4") tdDnodes.stop(1) @@ -70,7 +70,7 @@ class TDTestCase: tdLog.info("================= step7") tdSql.execute('reset query cache') tdSql.query('select * from tb1 order by ts desc') - tdSql.checkRows(self.maxrows / 2 + 1) + tdSql.checkRows(self.maxrows // 2 + 1) tdLog.info("================= step8") tdLog.info("import 10 data in batch before") @@ -83,7 +83,7 @@ class TDTestCase: tdLog.info("================= step9") tdSql.execute('reset query cache') tdSql.query('select * from tb1 order by ts desc') - tdSql.checkRows(self.maxrows / 2 + 11) + tdSql.checkRows(self.maxrows // 2 + 11) def stop(self): tdSql.close() diff --git a/tests/pytest/import_merge/importDataSub.py b/tests/pytest/import_merge/importDataSub.py index 2359ca214fd7313b93802c3c34a0406f98745647..e946a254c205b94c6a89702d7a037960c124ab99 100644 --- a/tests/pytest/import_merge/importDataSub.py +++ b/tests/pytest/import_merge/importDataSub.py @@ -46,16 +46,17 @@ class TDTestCase: self.maxrows) tdLog.info("================= step2") - tdLog.info("import %d sequential data" % (self.maxrows / 2)) + tdLog.info("import %d sequential data" % (self.maxrows // 2)) startTime = self.startTime sqlcmd = ['import into tb1 values'] - for rid in range(1, self.maxrows / 2 + 1): + for rid in range(1, self.maxrows // 2 + 1): sqlcmd.append('(%ld, %d)' % (startTime + rid, rid)) + tdSql.execute(" ".join(sqlcmd)) tdLog.info("================= step3") tdSql.query('select * from tb1') - tdSql.checkRows(self.maxrows / 2) + tdSql.checkRows(self.maxrows // 2) tdLog.info("================= step4") tdDnodes.stop(1) @@ -73,7 +74,7 @@ class TDTestCase: tdLog.info("================= step9") tdSql.execute('reset query cache') tdSql.query('select * from tb1 order by ts desc') - tdSql.checkRows(self.maxrows / 2) + tdSql.checkRows(self.maxrows // 2) def stop(self): tdSql.close() diff --git a/tests/pytest/import_merge/importToCommit.py b/tests/pytest/import_merge/importToCommit.py index 7a408bcdce52f8c699e751057554eb26fe70c4dc..3684dde049ff0185c3bde7ff50886c3e24ce55fe 100644 --- a/tests/pytest/import_merge/importToCommit.py +++ b/tests/pytest/import_merge/importToCommit.py @@ -33,7 +33,7 @@ class TDTestCase: tdDnodes.start(1) tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db cache 512 tables 10') + tdSql.execute('create database db cache 512 maxtables 10') tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/test-all.sh b/tests/test-all.sh index 93bfa7a4263e70f01ce206efa4a9e8a8b6674fc8..e58a6f51327c066b526d0332a2c7b1678d7cc4d4 100755 --- a/tests/test-all.sh +++ b/tests/test-all.sh @@ -21,11 +21,12 @@ fi echo -e "${GREEN} ### Total $totalSuccess TSIM case(s) succeed! ### ${NC}" totalFailed=`grep 'failed\|fault' out.txt | wc -l` -echo -e "${RED} ### Total $totalFailed TSIM case(s) failed! ### ${NC}" +# echo -e "${RED} ### Total $totalFailed TSIM case(s) failed! ### ${NC}" if [ "$totalFailed" -ne "0" ]; then -# echo -e "${RED} ### Total $totalFailed TSIM case(s) failed! ### ${NC}" - exit $totalFailed + echo -e "${RED} ### Total $totalFailed TSIM case(s) failed! ### ${NC}" + +# exit $totalFailed fi echo "### run Python script ###" @@ -46,6 +47,7 @@ fi totalPyFailed=`grep 'failed\|fault' pytest-out.txt | wc -l` if [ "$totalPyFailed" -ne "0" ]; then echo -e "${RED} ### Total $totalPyFailed python case(s) failed! ### ${NC}" - exit $totalPyFailed +# exit $totalPyFailed fi +exit $(($totalFailed + $totalPyFailed))