From a371a616f52b441911ab6071c5818cdbc5f2dcc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Csaba=20Osztrogon=C3=A1c?= Date: Tue, 26 Jan 2021 09:04:17 +0000 Subject: [PATCH] Remove a wrong test not to slow down test262-es2015 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since ES2018 iterator's next method is called once during the prologue of iteration, rather than during each step. The test is incorrect and stuck in an infinite loop. https://github.com/tc39/test262/pull/1248 fixed the test and it passes on test262-esnext. Removing test/language/statements/for-of/iterator-next-reference.js from test262-es2015 is necessary, because it won't pass ever and only slow down testing. JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu --- tools/runners/run-test-suite-test262.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/runners/run-test-suite-test262.py b/tools/runners/run-test-suite-test262.py index fb5e9979dc..4da81d4a09 100755 --- a/tools/runners/run-test-suite-test262.py +++ b/tools/runners/run-test-suite-test262.py @@ -97,6 +97,15 @@ def prepare_test262_test_suite(args): if os.path.isdir(path_to_remove): shutil.rmtree(path_to_remove) + # Since ES2018 iterator's next method is called once during the prologue of iteration, + # rather than during each step. The test is incorrect and stuck in an infinite loop. + # https://github.com/tc39/test262/pull/1248 fixed the test and it passes on test262-esnext. + if args.es2015: + test_to_remove = 'test/language/statements/for-of/iterator-next-reference.js' + path_to_remove = os.path.join(args.test_dir, os.path.normpath(test_to_remove)) + if os.path.isfile(path_to_remove): + os.remove(path_to_remove) + return 0