test: only stop taosd once win test
This commit is contained in:
parent
b71c3d5288
commit
8c01f5e8ad
|
@ -488,10 +488,13 @@ class TDDnode:
|
||||||
psCmd = "ps -ef|grep -w %s| grep -v grep | awk '{print $2}'" % toBeKilled
|
psCmd = "ps -ef|grep -w %s| grep -v grep | awk '{print $2}'" % toBeKilled
|
||||||
processID = subprocess.check_output(
|
processID = subprocess.check_output(
|
||||||
psCmd, shell=True).decode("utf-8")
|
psCmd, shell=True).decode("utf-8")
|
||||||
|
|
||||||
|
onlyKillOnceWindows = 0
|
||||||
while(processID):
|
while(processID):
|
||||||
killCmd = "kill -INT %s > /dev/null 2>&1" % processID
|
if not platform.system().lower() == 'windows' or (onlyKillOnceWindows == 0 and platform.system().lower() == 'windows'):
|
||||||
os.system(killCmd)
|
killCmd = "kill -INT %s > /dev/null 2>&1" % processID
|
||||||
|
os.system(killCmd)
|
||||||
|
onlyKillOnceWindows = 1
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
processID = subprocess.check_output(
|
processID = subprocess.check_output(
|
||||||
psCmd, shell=True).decode("utf-8")
|
psCmd, shell=True).decode("utf-8")
|
||||||
|
@ -524,9 +527,12 @@ class TDDnode:
|
||||||
processID = subprocess.check_output(
|
processID = subprocess.check_output(
|
||||||
psCmd, shell=True).decode("utf-8")
|
psCmd, shell=True).decode("utf-8")
|
||||||
|
|
||||||
|
onlyKillOnceWindows = 0
|
||||||
while(processID):
|
while(processID):
|
||||||
killCmd = "kill -INT %s > /dev/null 2>&1" % processID
|
if not platform.system().lower() == 'windows' or (onlyKillOnceWindows == 0 and platform.system().lower() == 'windows'):
|
||||||
os.system(killCmd)
|
killCmd = "kill -INT %s > /dev/null 2>&1" % processID
|
||||||
|
os.system(killCmd)
|
||||||
|
onlyKillOnceWindows = 1
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
processID = subprocess.check_output(
|
processID = subprocess.check_output(
|
||||||
psCmd, shell=True).decode("utf-8")
|
psCmd, shell=True).decode("utf-8")
|
||||||
|
@ -550,9 +556,12 @@ class TDDnode:
|
||||||
processID = subprocess.check_output(
|
processID = subprocess.check_output(
|
||||||
psCmd, shell=True).decode("utf-8")
|
psCmd, shell=True).decode("utf-8")
|
||||||
|
|
||||||
|
onlyKillOnceWindows = 0
|
||||||
while(processID):
|
while(processID):
|
||||||
killCmd = "kill -KILL %s > /dev/null 2>&1" % processID
|
if not platform.system().lower() == 'windows' or (onlyKillOnceWindows == 0 and platform.system().lower() == 'windows'):
|
||||||
os.system(killCmd)
|
killCmd = "kill -KILL %s > /dev/null 2>&1" % processID
|
||||||
|
os.system(killCmd)
|
||||||
|
onlyKillOnceWindows = 1
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
processID = subprocess.check_output(
|
processID = subprocess.check_output(
|
||||||
psCmd, shell=True).decode("utf-8")
|
psCmd, shell=True).decode("utf-8")
|
||||||
|
|
|
@ -35,14 +35,14 @@ enum {
|
||||||
|
|
||||||
/* label stack */
|
/* label stack */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char top; /* number of labels */
|
int8_t top; /* number of labels */
|
||||||
int16_t pos[MAX_NUM_LABLES]; /* the position of the label */
|
int16_t pos[MAX_NUM_LABLES]; /* the position of the label */
|
||||||
char label[MAX_NUM_LABLES][MAX_LABEL_LEN]; /* name of the label */
|
char label[MAX_NUM_LABLES][MAX_LABEL_LEN]; /* name of the label */
|
||||||
} SLabel;
|
} SLabel;
|
||||||
|
|
||||||
/* block definition */
|
/* block definition */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char top; /* the number of blocks stacked */
|
int8_t top; /* the number of blocks stacked */
|
||||||
char type[MAX_NUM_BLOCK]; /* the block type */
|
char type[MAX_NUM_BLOCK]; /* the block type */
|
||||||
int16_t *pos[MAX_NUM_BLOCK]; /* position of the jump for if/elif/case */
|
int16_t *pos[MAX_NUM_BLOCK]; /* position of the jump for if/elif/case */
|
||||||
int16_t back[MAX_NUM_BLOCK]; /* go back, endw and continue */
|
int16_t back[MAX_NUM_BLOCK]; /* go back, endw and continue */
|
||||||
|
|
|
@ -758,7 +758,6 @@ void shellReadHistory() {
|
||||||
taosCloseFile(&pFile);
|
taosCloseFile(&pFile);
|
||||||
int64_t file_size;
|
int64_t file_size;
|
||||||
if (taosStatFile(pHistory->file, &file_size, NULL) == 0 && file_size > SHELL_MAX_COMMAND_SIZE) {
|
if (taosStatFile(pHistory->file, &file_size, NULL) == 0 && file_size > SHELL_MAX_COMMAND_SIZE) {
|
||||||
fprintf(stdout,"%s(%d) %s %08" PRId64 "\n", __FILE__, __LINE__,__func__,taosGetSelfPthreadId());fflush(stdout);
|
|
||||||
TdFilePtr pFile = taosOpenFile(pHistory->file, TD_FILE_CREATE | TD_FILE_WRITE | TD_FILE_STREAM | TD_FILE_TRUNC);
|
TdFilePtr pFile = taosOpenFile(pHistory->file, TD_FILE_CREATE | TD_FILE_WRITE | TD_FILE_STREAM | TD_FILE_TRUNC);
|
||||||
if (pFile == NULL) return;
|
if (pFile == NULL) return;
|
||||||
int32_t endIndex = pHistory->hstart;
|
int32_t endIndex = pHistory->hstart;
|
||||||
|
|
Loading…
Reference in New Issue