diff --git a/cmake/install.inc b/cmake/install.inc index 9dfe8d0ac6c4dd73b090c60605595f6be3abc478..9ecd9bcd4fa722dd039170ef30220679cedf65b1 100755 --- a/cmake/install.inc +++ b/cmake/install.inc @@ -1,8 +1,7 @@ IF (TD_LINUX) SET(TD_MAKE_INSTALL_SH "${TD_COMMUNITY_DIR}/packaging/tools/make_install.sh") INSTALL(CODE "MESSAGE(\"make install script: ${TD_MAKE_INSTALL_SH}\")") - INSTALL(CODE "execute_process(COMMAND chmod 777 ${TD_MAKE_INSTALL_SH})") - INSTALL(CODE "execute_process(COMMAND ${TD_MAKE_INSTALL_SH} ${TD_COMMUNITY_DIR} ${PROJECT_BINARY_DIR} Linux ${TD_VER_NUMBER})") + INSTALL(CODE "execute_process(COMMAND bash ${TD_MAKE_INSTALL_SH} ${TD_COMMUNITY_DIR} ${PROJECT_BINARY_DIR} Linux ${TD_VER_NUMBER})") ELSEIF (TD_WINDOWS) IF (TD_POWER) SET(CMAKE_INSTALL_PREFIX C:/PowerDB) @@ -41,6 +40,5 @@ ELSEIF (TD_WINDOWS) ELSEIF (TD_DARWIN) SET(TD_MAKE_INSTALL_SH "${TD_COMMUNITY_DIR}/packaging/tools/make_install.sh") INSTALL(CODE "MESSAGE(\"make install script: ${TD_MAKE_INSTALL_SH}\")") - INSTALL(CODE "execute_process(COMMAND chmod 777 ${TD_MAKE_INSTALL_SH})") - INSTALL(CODE "execute_process(COMMAND ${TD_MAKE_INSTALL_SH} ${TD_COMMUNITY_DIR} ${PROJECT_BINARY_DIR} Darwin ${TD_VER_NUMBER})") + INSTALL(CODE "execute_process(COMMAND bash ${TD_MAKE_INSTALL_SH} ${TD_COMMUNITY_DIR} ${PROJECT_BINARY_DIR} Darwin ${TD_VER_NUMBER})") ENDIF () diff --git a/tests/pytest/tools/taosdemoTestTblAlt.py b/tests/pytest/tools/taosdemoTestTblAlt.py index 70df535f59cbb97469b7a73e4e230d9a8671bfc7..89c1b92e140cb1e19b549d3248693153e116c52e 100644 --- a/tests/pytest/tools/taosdemoTestTblAlt.py +++ b/tests/pytest/tools/taosdemoTestTblAlt.py @@ -54,27 +54,36 @@ class TDTestCase: binPath = buildPath + "/build/bin/" if(threadID == 0): - os.system("%staosdemo -y -t %d -n %d -b INT,INT,INT,INT -m t" % + print("%staosdemo -y -t %d -n %d -b INT,INT,INT,INT" % + (binPath, self.numberOfTables, self.numberOfRecords)) + os.system("%staosdemo -y -t %d -n %d -b INT,INT,INT,INT" % (binPath, self.numberOfTables, self.numberOfRecords)) if(threadID == 1): time.sleep(2) print("use test") - while True: + max_try = 100 + count = 0 + while (count < max_try): try: tdSql.execute("use test") break except Exception as e: tdLog.info("use database test failed") - time.sleep(1) + time.sleep(2) + count += 1 + print("try %d times" % count) continue # check if all the tables have heen created - while True: + count = 0 + while (count < max_try): try: tdSql.query("show tables") except Exception as e: tdLog.info("show tables test failed") - time.sleep(1) + time.sleep(2) + count += 1 + print("try %d times" % count) continue rows = tdSql.queryRows @@ -83,13 +92,17 @@ class TDTestCase: break time.sleep(1) # check if there are any records in the last created table - while True: + count = 0 + while (count < max_try): print("query started") + print("try %d times" % count) try: - tdSql.query("select * from test.t7") + tdSql.query("select * from test.d7") except Exception as e: tdLog.info("select * test failed") time.sleep(2) + count += 1 + print("try %d times" % count) continue rows = tdSql.queryRows @@ -100,8 +113,8 @@ class TDTestCase: print("alter table test.meters add column c10 int") tdSql.execute("alter table test.meters add column c10 int") - print("insert into test.t7 values (now, 1, 2, 3, 4, 0)") - tdSql.execute("insert into test.t7 values (now, 1, 2, 3, 4, 0)") + print("insert into test.d7 values (now, 1, 2, 3, 4, 0)") + tdSql.execute("insert into test.d7 values (now, 1, 2, 3, 4, 0)") def run(self): tdSql.prepare()