From 205d2281e1b190a844c096c0c01562847ed1595a Mon Sep 17 00:00:00 2001 From: Neil Dhar Date: Wed, 13 Nov 2024 11:09:54 -0800 Subject: [PATCH] Enable TDZ and block scoping for all testsuite tests Summary: Enable TDZ and block scoping when running all tests by default. Reviewed By: avp Differential Revision: D60487783 fbshipit-source-id: 4b9eeb92f476353775e15fa9c7b5b25bc7fc8bc3 --- utils/testsuite/hermes.py | 7 ++++++- utils/testsuite/test_run_defs.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/utils/testsuite/hermes.py b/utils/testsuite/hermes.py index 717aa507d05..3a24ae2c24f 100644 --- a/utils/testsuite/hermes.py +++ b/utils/testsuite/hermes.py @@ -14,7 +14,12 @@ from .progress import TestCaseResult, TestResultCode from .typing_defs import OptExpectedFailure, PathT -COMPILE_ARGS = ["-test262", "-fno-static-builtins"] +COMPILE_ARGS = [ + "-test262", + "-fno-static-builtins", + "-Xes6-block-scoping", + "-Xenable-tdz", +] ES6_ARGS = ["-Xes6-promise", "-Xes6-proxy"] EXTRA_RUN_ARGS = ["-Xhermes-internal-test-methods"] USE_MICROTASK_FLAG = ["-Xmicrotask-queue"] diff --git a/utils/testsuite/test_run_defs.py b/utils/testsuite/test_run_defs.py index 92e385e0bbf..578a7645a69 100644 --- a/utils/testsuite/test_run_defs.py +++ b/utils/testsuite/test_run_defs.py @@ -285,7 +285,7 @@ async def run_test(self, args: TestRunArgs) -> TestCaseResult: args.test_file, SkipCategory.HANDLESAN_SKIP_LIST ) extra_compile_vm_args = deepcopy(args.extra_compile_vm_args) - extra_compile_vm_args.compile_args += ["-Xes6-class", "-Xenable-tdz"] + extra_compile_vm_args.compile_args += ["-Xes6-class"] compile_run_args = CompileRunArgs( full_test_name, test_case.strict_mode,