diff --git a/Jenkinsfile2 b/Jenkinsfile2 index 11f52e4251..7ba9b4a933 100644 --- a/Jenkinsfile2 +++ b/Jenkinsfile2 @@ -354,7 +354,8 @@ def pre_test_build_win() { ''' bat ''' cd %WIN_COMMUNITY_ROOT%/tests/ci - python install_taos_py_con.py taospy==2.7.16 taos-ws-py==0.3.3 + pip3 install taospy==2.7.16 + pip3 install taos-ws-py==0.3.3 xcopy /e/y/i/f %WIN_INTERNAL_ROOT%\\debug\\build\\lib\\taos.dll C:\\Windows\\System32 ''' return 1 diff --git a/tests/army/query/function/generate_answer.sh b/tests/army/query/function/generate_answer.sh new file mode 100755 index 0000000000..6b798865bd --- /dev/null +++ b/tests/army/query/function/generate_answer.sh @@ -0,0 +1,44 @@ +#!/bin/bash +set -e +set -x +# 检查是否传入了两个参数 +# echo "参数个数: $#" +# if [ "$#" -ne 4 ]; then +# echo "使用方法: $0 -i -o " +# exit 1 +# fi + +# 读取传入的参数 +while getopts "i:o:" opt; do + case $opt in + i) + sqlfile="$OPTARG" + ;; + o) + query_result_file="$OPTARG" + ;; + \?) + echo "无效选项: -$OPTARG" >&2 + exit 1 + ;; + :) + echo "选项 -$OPTARG 需要一个参数." >&2 + exit 1 + ;; + esac +done + +# 删除sqlfile文件中每一行末尾的分号和空格 +sed -i 's/;\s*$//' "$sqlfile" + +# 执行SQL文件并生成query_result_file文件 +taos -f "$sqlfile" | grep -v 'Query OK' | grep -v 'Copyright' | grep -v 'Welcome to the TDengine Command' > "$query_result_file" +# echo $(cat "$query_result_file") +# echo "1" +# sed -i 's/ ([^()]*)$//' "$query_result_file" +# echo "1" +# 打印输入的文件名 +echo "输入的文件: $sqlfile" + +# 打印输出的文件名 +echo "输出的文件: $query_result_file" \ No newline at end of file diff --git a/tests/parallel_test/run_case.sh b/tests/parallel_test/run_case.sh index 9c7daa147c..5b0d34fc0a 100755 --- a/tests/parallel_test/run_case.sh +++ b/tests/parallel_test/run_case.sh @@ -77,9 +77,8 @@ md5sum /usr/lib/libtaos.so.1 md5sum /home/TDinternal/debug/build/lib/libtaos.so #get python connector and update: taospy 2.7.16 taos-ws-py 0.3.3 -cd /home/TDinternal/community/tests/ci/ -python install_taos_py_con.py taospy==2.7.16 taos-ws-py==0.3.3 - +pip3 install taospy==2.7.16 +pip3 install taos-ws-py==0.3.3 $TIMEOUT_CMD $cmd RET=$? echo "cmd exit code: $RET"