Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtests: Add option to skip dependence check #377

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions BM/runtests
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ TEST_FILES=""
SUB_FOLDERS=""
TEST_LIST_FILE="/tmp/tests"
OLD_IFS=""
SKIP_DEP_CHECK="false"

# For dependence check parameters, set skip for unknow staus as default
readonly MARK_HW_DEP="@hw_dep:"
Expand All @@ -45,6 +46,7 @@ Usage: ${0##*/} [-f CMDFILES] [-c CMDLINE] [-o LOGFILE]
-c CMDLINE execute test case
-s SCENARIO_FOLDER all tests-* files under target folder
-o LOGFILE redirect output of tests to file
-k skip dependence check

Examples:
./runtests -f cet/tests
Expand Down Expand Up @@ -398,11 +400,13 @@ run_tests() {
for cmdfile in $(tr "," " " <<< "$CMDFILES"); do
check_test_file_legal "$cmdfile" || continue

check_dep_feature "$cmdfile" || {
append_log "Skip $cmdfile due to dependece, please check $DEP_LOG" "$LOGFILE"
DEP_EXIT=$BLOCK_CODE
continue
}
if [ "$SKIP_DEP_CHECK" == "false" ]; then
check_dep_feature "$cmdfile" || {
append_log "Skip $cmdfile due to dependece, please check $DEP_LOG" "$LOGFILE"
DEP_EXIT=$BLOCK_CODE
continue
}
fi
append_log "Next run cases from $cmdfile" "$LOGFILE"
runcmdfile "$cmdfile" "$LOGFILE"
done
Expand All @@ -417,7 +421,7 @@ run_tests() {
: CMDFILES=""
: CMDLINE=""

while getopts ":o:d:f:t:s:c:h" opt; do
while getopts ":o:d:f:t:s:c:kh" opt; do
case "$opt" in
o)
LOGFILE=$OPTARG
Expand Down Expand Up @@ -465,6 +469,9 @@ while getopts ":o:d:f:t:s:c:h" opt; do
c)
CMDLINE=$OPTARG
;;
k)
SKIP_DEP_CHECK="true"
;;
h)
usage
exit 0
Expand Down
Loading