From 897aa85a20aea22bcdca65f40505e94947390f83 Mon Sep 17 00:00:00 2001 From: tangfangzhi Date: Wed, 11 May 2022 19:16:42 +0800 Subject: [PATCH] enh: ctest with enterprise version --- tests/parallel_test/collect_cases.sh | 36 ++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/tests/parallel_test/collect_cases.sh b/tests/parallel_test/collect_cases.sh index a513d62d94..c560598c81 100755 --- a/tests/parallel_test/collect_cases.sh +++ b/tests/parallel_test/collect_cases.sh @@ -2,14 +2,42 @@ case_file=/tmp/cases.task -if [ ! -z $1 ]; then - case_file="$1" -fi +function usage() { + echo "$0" + echo -e "\t -o output case file" + echo -e "\t -e enterprise edition" + echo -e "\t -h help" +} + +ent=0 +while getopts "o:eh" opt; do + case $opt in + o) + case_file=$OPTARG + ;; + e) + ent=1 + ;; + h) + usage + exit 0 + ;; + \?) + echo "Invalid option: -$OPTARG" + usage + exit 0 + ;; + esac +done script_dir=`dirname $0` cd $script_dir -echo ",,unit-test,bash test.sh" >$case_file +if [ $ent -eq 0 ]; then + echo ",,unit-test,bash test.sh" >$case_file +else + echo ",,unit-test,bash test.sh -e" >$case_file +fi cat ../script/jenkins/basic.txt |grep -v "^#"|grep -v "^$"|sed "s/^/,,script,/" >>$case_file grep "^python" ../system-test/fulltest.sh |sed "s/^/,,system-test,/" >>$case_file -- GitLab