escargot/tools/debugger/debugger_tester.sh
bence gabor kis 8de35fd707 Add Escargot-Debugger test runner
To use the Escargot Debugger test system.
First the Escargot needs to be build with the -DESCARGOT_DEBUGGER=1 option, then
run the ./tools/run-test.py with the escargot-debugger command

Signed-off-by: bence gabor kis <kisbg@inf.u-szeged.hu>
2020-03-26 18:16:33 +09:00

16 lines
357 B
Bash
Executable file

#!/bin/bash
ESCARGOT=$1
TEST_CASE=$2
DEBUGGER_CLIENT=$3
${ESCARGOT} --start-debug-server ${TEST_CASE}.js &
sleep 1s
RESULT_TEMP=`mktemp ${TEST_CASE}.out.XXXXXXXXXX`
(cat "${TEST_CASE}.cmd" | ${DEBUGGER_CLIENT} --non-interactive) >${RESULT_TEMP} 2>&1
diff -U0 ${RESULT_TEMP} ${TEST_CASE}.expected
STATUS_CODE=$?
rm -f ${RESULT_TEMP}
exit ${STATUS_CODE}