From 5e8d61168fc86c656344e149b7abadd43a40a27e Mon Sep 17 00:00:00 2001 From: qwang59 Date: Mon, 22 Jul 2024 15:57:37 +0800 Subject: [PATCH] Add skip_test definition Signed-off-by: qwang59 --- BM/common/common.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/BM/common/common.sh b/BM/common/common.sh index 1292bb3a..f8c67c7f 100755 --- a/BM/common/common.sh +++ b/BM/common/common.sh @@ -158,6 +158,14 @@ block_test() { exit 2 } +skip_test() { + 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.