Skip to content

Commit

Permalink
hijack.sh: extract new print_test_result_exit() function
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
marc-hb committed Apr 5, 2024
1 parent 98bf3b7 commit 0831bbc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion case-lib/hijack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,13 @@ function func_exit_handler()
fi
}

print_test_result_exit $exit_status
}

print_test_result_exit()
{
local exit_status="$1"

# We must always print some 'Test Result' otherwise some callers
# will time out. These strings must match (at least) Jenkins'
# expectations, see internal sof-framework/clsTestCase.py
Expand All @@ -198,7 +205,7 @@ function func_exit_handler()
;;
esac

builtin exit $exit_status
builtin exit "$exit_status"
}

SUDO_LEVEL=""
Expand Down

0 comments on commit 0831bbc

Please sign in to comment.