diff --git a/BUILD.gn b/BUILD.gn index cb45a8925d45fe6ff07513ef81c318895742c2c6..e279442308631c389531f66b2f204beaf7e23a9d 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -35,7 +35,37 @@ if (defined(ohos_lite)) { # is on lite Os for ipcamera "JERRY_HEAPDUMP", "JERRY_REF_TRACKER", ] - defines += es6_support_defines + + if (thirdparty_jerryscript_test == true && + thirdparty_jerryscript_test_enable_es2015 == true) { + defines += [ + "JERRY_BUILTIN_REGEXP=1", + "JERRY_BUILTIN_EVAL_DISABLED=0", + "JERRY_ES2015=1", + "JERRY_ES2015_BUILTIN_WEAKMAP=1", + "JERRY_ES2015_BUILTIN_WEAKSET=1", + "JERRY_ES2015_BUILTIN_DATAVIEW=1", + "JERRY_ES2015_BUILTIN_REFLECT=1", + "JERRY_GLOBAL_HEAP_SIZE=512", + "JERRY_STACK_LIMIT=96", + ] + } + + if (thirdparty_jerryscript_test == true && + thirdparty_jerryscript_test_enable_es2015 == false) { + defines += [ + "JERRY_BUILTIN_EVAL_DISABLED=0", + "JERRY_BUILTIN_REGEXP=1", + "JERRY_ES2015=0", + "JERRY_GLOBAL_HEAP_SIZE=512", + "JERRY_STACK_LIMIT=96", + ] + } + + if (thirdparty_jerryscript_test == false) { + defines += es6_support_defines + } + cflags = [ "-Wno-unused-function", "-Wno-sign-compare", diff --git a/bundle.json b/bundle.json index be1d40e341d6405d0b1df1706dfc356b18dd8429..f975c977024265c91864f9f3522c2e6e406e2298 100644 --- a/bundle.json +++ b/bundle.json @@ -18,7 +18,9 @@ "thirdparty_jerryscript_inputjs_buffer_size", "thirdparty_jerryscript_snapshot_buffer_size", "thirdparty_jerryscript_bms_task_heap_size", - "thirdparty_jerryscript_js_task_heap_size" + "thirdparty_jerryscript_js_task_heap_size", + "thirdparty_jerryscript_test_enable_es2015", + "thirdparty_jerryscript_test" ], "adapted_system_type": [], "rom": "", diff --git a/engine.gni b/engine.gni index 7ee69a24b01136479f8c703e4da94d4009071c3c..ac9b167b85732118c87f077d0ac438d83e43dc80 100644 --- a/engine.gni +++ b/engine.gni @@ -17,6 +17,8 @@ declare_args() { thirdparty_jerryscript_snapshot_buffer_size = 24576 thirdparty_jerryscript_bms_task_heap_size = 64 thirdparty_jerryscript_js_task_heap_size = 64 + thirdparty_jerryscript_test_enable_es2015 = false + thirdparty_jerryscript_test = false } engine_path = "//third_party/jerryscript" diff --git a/tools/runners/run-test-suite.py b/tools/runners/run-test-suite.py old mode 100644 new mode 100755