]> git.ipfire.org Git - thirdparty/grub.git/commit
tests: Do not occlude subshell error codes when used as input to the test command
authorGlenn Washburn <development@efficientek.com>
Wed, 13 Oct 2021 00:39:58 +0000 (19:39 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 14 Oct 2021 12:45:10 +0000 (14:45 +0200)
commit9bbcfb71ce497c2f72603b10fff399e0f9b28d8b
tree58ce1918934dd376861fa2e00a43575327ede77e
parent5e0a8129eff822ab2a0515b58aefa94ada61b23d
tests: Do not occlude subshell error codes when used as input to the test command

When using the output of a subshell as input, its error code is ignored in
the context of "set -e". Many test scripts use grub-shell in a subshell with
output used as an argument to the test command to test for expected output.
Refactor these tests so that the subshell output goes to a shell variable,
so that if the subshell errors the script will immediately exit with an
error code.

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
13 files changed:
tests/ahci_test.in
tests/cdboot_test.in
tests/core_compress_test.in
tests/ehci_test.in
tests/fddboot_test.in
tests/gzcompress_test.in
tests/hddboot_test.in
tests/lzocompress_test.in
tests/netboot_test.in
tests/ohci_test.in
tests/pata_test.in
tests/uhci_test.in
tests/xzcompress_test.in