tests: don't hardcode /bin/kill in the kill tests
If the 'kill' test is executed with --use-system-commands, it calls /bin/kill to avoid the shell's own kill command being invoked. However, this doesn't work if the kill we want to test isn't in fact in /bin. Instead, use $(which kill) to find a kill on the PATH and call that directly. Signed-off-by: Ross Burton <ross.burton@arm.com>
This commit is contained in:
parent
54da548e02
commit
0be381be44
|
@ -22,7 +22,7 @@ ts_skip_nonroot
|
|||
|
||||
# make sure we do not use shell built-in command
|
||||
if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then
|
||||
TS_CMD_KILL="/bin/kill"
|
||||
TS_CMD_KILL="$(which kill)"
|
||||
fi
|
||||
|
||||
ts_check_test_command "$TS_CMD_KILL"
|
||||
|
|
|
@ -20,7 +20,7 @@ ts_init "$*"
|
|||
|
||||
# make sure we do not use shell built-in command
|
||||
if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then
|
||||
TS_CMD_KILL="/bin/kill"
|
||||
TS_CMD_KILL="$(which kill)"
|
||||
fi
|
||||
|
||||
ts_check_test_command "$TS_CMD_KILL"
|
||||
|
|
|
@ -20,7 +20,7 @@ ts_init "$*"
|
|||
|
||||
# make sure we do not use shell built-in command
|
||||
if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then
|
||||
TS_CMD_KILL="/bin/kill"
|
||||
TS_CMD_KILL="$(which kill)"
|
||||
fi
|
||||
|
||||
ts_check_test_command "$TS_CMD_KILL"
|
||||
|
|
|
@ -20,7 +20,7 @@ ts_init "$*"
|
|||
|
||||
# make sure we do not use shell built-in command
|
||||
if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then
|
||||
TS_CMD_KILL="/bin/kill"
|
||||
TS_CMD_KILL="$(which kill)"
|
||||
fi
|
||||
|
||||
ts_check_test_command "$TS_CMD_KILL"
|
||||
|
|
|
@ -20,7 +20,7 @@ ts_init "$*"
|
|||
|
||||
# make sure we do not use shell built-in command
|
||||
if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then
|
||||
TS_CMD_KILL="/bin/kill"
|
||||
TS_CMD_KILL="$(which kill)"
|
||||
fi
|
||||
|
||||
ts_check_test_command "$TS_CMD_KILL"
|
||||
|
|
Loading…
Reference in New Issue