From 90dfee3cdb3ff349a55c9d0aefb2a27eb3fa89b8 Mon Sep 17 00:00:00 2001 From: Ruben Ayrapetyan Date: Thu, 30 Oct 2014 16:06:57 +0300 Subject: [PATCH] Updating tools/run_test_suite_test262.sh to handle tests marked '@negative'. --- tools/run_test_suite_test262.sh | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/tools/run_test_suite_test262.sh b/tools/run_test_suite_test262.sh index 434dce72a..d215034ed 100755 --- a/tools/run_test_suite_test262.sh +++ b/tools/run_test_suite_test262.sh @@ -14,5 +14,29 @@ TARGET=$1 PARSE=$2 -rm ./js.files jerry.error jerry.passed; ./tools/jerry_test.sh ./out/$TARGET/jerry . ./tests/test262/test/suite/ ./tests/test262/test/harness/sta-jerry.js $PARSE +TEST_SUITE_PATH="./tests/test262/test" +STA_JS="$TEST_SUITE_PATH/harness/sta-jerry.js" + +for chapter in `ls $TEST_SUITE_PATH/suite`; +do + rm -f jerry.error."$chapter" + + for test in `find $TEST_SUITE_PATH/suite/$chapter -name *.js` + do + grep "\* @negative" $test 2>&1 >/dev/null + negative=$? + + output=`./out/$TARGET/jerry $PARSE $STA_JS $test 2>&1` + status=$? + + if [[ $status -eq 0 && $negative -eq 0 || $status -ne 0 && $negative -ne 0 ]] + then + (echo "===================="; + echo "./out/$TARGET/jerry $PARSE $STA_JS $test failed: $status"; + echo "---------------------"; + echo $output; + echo;) >> jerry.error."$chapter" + fi + done +done