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

Add skip_test definition #330

Merged
merged 1 commit into from
Aug 2, 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
8 changes: 8 additions & 0 deletions BM/common/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,14 @@ block_test() {
exit 2
}

skip_test() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @qwang59 Could you please detail a little bit why we need this?

caller_info="${BASH_SOURCE[1]##*/}:${BASH_LINENO[0]}:${FUNCNAME[1]}()"
test_print_wrg "skip_test() is called by $caller_info"
test_print_wrg "SKIPPING TEST: $*"
exec_teardown
exit 0
}

# Wrapper function to mark a test as not applicable,
# it accepts a string to explain why the test is not
# applicable. exec_teardown is called before exiting with 32.
Expand Down
Loading