TDengine/tests/parallel_test/split_case.sh
Xuefeng Tan 449f7115e4
fix: windows test (#20256)
* fix: windows sim test

* fix: windows sim test

* fix: random on windows

* fix: taosd online check

* fix: windows path in python test

* fix: windows python test

* fix: windows python test

* fix: windows python test

* fix: windows python test

* fix: windows python test

* fix: windows python test

* fix: windows python test

* fix: windows python test

* fix: windows python test

* fix: make_install.bat

* fix: python test

* fix: jdbc test

* fix: develop test

* fix: develop test

* fix:add log

* test:add win case file

* test:add win case file

* test:add win case file

* fix: python test get taosBenchmark path

* test:add win case file

* test:comment some failed cases in win

* test:add win case file

* test:add win case file

* test:comment some win case file

* test:add some win case file

---------

Co-authored-by: wangmm0220 <wangmm0220@gmail.com>
Co-authored-by: chenhaoran <haoran920c@163.com>
2023-03-16 10:18:06 +08:00

58 lines
1.8 KiB
Bash
Executable file

case_file="cases_temp_file"
parm_path=$(dirname $0)
parm_path=$(pwd ${parm_path})
echo "execute path:${parm_path}"
cd ${parm_path}
cp cases.task ${case_file}
sed -i '/^$/d' ${case_file}
sed -i '$a\%%FINISHED%%' ${case_file}
utest="unit-test"
tsimtest="script"
systest="system-test"
devtest="develop-test"
doctest="docs-examples-test"
rm -rf win-${utest}.log win-${tsimtest}.log win-${systest}.log win-${devtest}.log win-${doctest}.log
rm -rf ${parm_path}/../${utest}/win-test-file ${parm_path}/../${tsimtest}/win-test-file ${parm_path}/../${systest}/win-test-file ${parm_path}/../${devtest}/win-test-file
while read -r line
do
echo "$line"|grep -q "^#"
if [ $? -eq 0 ]; then
continue
fi
exec_dir=$(echo "$line"|cut -d ',' -f4)
case_cmd=$(echo "$line"|cut -d ',' -f5)
if [[ "${exec_dir}" == "${utest}" ]]; then
echo ${case_cmd} >> win-${utest}.log
continue
fi
if [[ "${exec_dir}" == "${tsimtest}" ]]; then
echo ${case_cmd} >> win-${tsimtest}.log
continue
fi
if [[ "${exec_dir}" == "${systest}" ]]; then
if [[ "${case_cmd}" =~ "pytest.sh" ]]; then
case_cmd=$(echo "$case_cmd"|cut -d ' ' -f 2-)
echo ${case_cmd} >> win-${systest}.log
else
echo ${case_cmd} >> win-${systest}.log
fi
continue
fi
if [[ "${exec_dir}" == "${devtest}" ]]; then
echo ${case_cmd} >> win-${devtest}.log
continue
fi
if [[ "${exec_dir}" == "${doctest}" ]]; then
echo ${case_cmd} >> win-${doctest}.log
continue
fi
done < ${case_file}
mv win-${utest}.log ${parm_path}/../${utest}/win-test-file
mv win-${tsimtest}.log ${parm_path}/../${tsimtest}/win-test-file
mv win-${systest}.log ${parm_path}/../${systest}/win-test-file
mv win-${devtest}.log ${parm_path}/../${devtest}/win-test-file
rm -rf ${case_file}