Skip to content

Commit 3b71e39

Browse files
committed
hijack.sh: extract new print_test_result_exit() function
Extract new print_test_result_exit() function from exit handler(). This make it possible for some "light-weight" tests like verify-kernel-boot-log.sh to not depend on the heavy and start_test() and exit handler machinery. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
1 parent 0315617 commit 3b71e39

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

case-lib/hijack.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,13 @@ function func_exit_handler()
179179
fi
180180
}
181181

182+
print_test_result_exit $exit_status
183+
}
184+
185+
print_test_result_exit()
186+
{
187+
local exit_status="$1"
188+
182189
# We must always print some 'Test Result' otherwise some callers
183190
# will time out. These strings must match (at least) Jenkins'
184191
# expectations, see internal sof-framework/clsTestCase.py
@@ -198,7 +205,7 @@ function func_exit_handler()
198205
;;
199206
esac
200207

201-
builtin exit $exit_status
208+
builtin exit "$exit_status"
202209
}
203210

204211
SUDO_LEVEL=""

0 commit comments

Comments
 (0)