mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Rewrite debugger test runner to use portable redirect-and-append notation (#2641)
The test runner used `&>>` to channel stderr to stdout and append all that to a file. However, that's Bash 4 syntax, which is not available everywhere, e.g., on MacOS. Bash pre-4 syntax requires the classic `>>file 2>&1` notation. This commit rewrites the test runner to use the portable syntax. Moreover, it also rewrites `&>` to `>file 2>&1` for the sake of consistency. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
parent
9b24bde4c6
commit
8ed5078e96
@ -40,11 +40,11 @@ sleep 1s
|
||||
|
||||
RESULT_TEMP=`mktemp ${TEST_CASE}.out.XXXXXXXXXX`
|
||||
|
||||
(cat "${TEST_CASE}.cmd" | ${DEBUGGER_CLIENT} --non-interactive ${CLIENT_ARGS}) &> ${RESULT_TEMP}
|
||||
(cat "${TEST_CASE}.cmd" | ${DEBUGGER_CLIENT} --non-interactive ${CLIENT_ARGS}) >${RESULT_TEMP} 2>&1
|
||||
|
||||
if [[ $TEST_CASE == *"restart"* ]]; then
|
||||
CONTINUE_CASE=$(sed "s/restart/continue/g" <<< "$TEST_CASE")
|
||||
(cat "${CONTINUE_CASE}.cmd" | ${DEBUGGER_CLIENT} --non-interactive ${CLIENT_ARGS}) &>> ${RESULT_TEMP}
|
||||
(cat "${CONTINUE_CASE}.cmd" | ${DEBUGGER_CLIENT} --non-interactive ${CLIENT_ARGS}) >>${RESULT_TEMP} 2>&1
|
||||
fi
|
||||
|
||||
diff -U0 ${TEST_CASE}.expected ${RESULT_TEMP}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user