From 951503bd3c9630b7c077e9a8b54f5f14d78c3043 Mon Sep 17 00:00:00 2001 From: lordwithcc Date: Tue, 25 Oct 2022 19:15:22 +0800 Subject: [PATCH] Modify the test262 command and others Signed-off-by: lordwithcc --- build/compile_script/ark.py | 2 +- build/config/BUILDCONFIG.gn | 1 - build/core/gn/BUILD.gn | 16 ++++++++++++---- build/prebuilts_download/prebuilts_download.py | 14 -------------- .../prebuilts_download_config.json | 13 ------------- 5 files changed, 13 insertions(+), 33 deletions(-) diff --git a/build/compile_script/ark.py b/build/compile_script/ark.py index 056168f2..c27a5db3 100644 --- a/build/compile_script/ark.py +++ b/build/compile_script/ark.py @@ -197,7 +197,7 @@ def RunTest(template): test = template[5] test_dir = arch + "." + mode test262_code = '''cd arkcompiler/ets_frontend - python3 test262/run_test262.py --es2021 all --timeout 180000 --libs-dir ../../out/%s:../../prebuilts/clang/ohos/linux-x86_64/llvm/lib --ark-tool=../../out/%s/ark/ark_js_runtime/ark_js_vm --ark-frontend-binary=../../out/%s/clang_x64/ark/ark/es2abc --merge-abc-binary=../../out/%s/ark/ark/merge_abc --ark-frontend=es2panda + python3 test262/run_test262.py --es2021 all --timeout 180000 --libs-dir ../../out/%s/clang_x64/thirdparty/icu:../../prebuilts/clang/ohos/linux-x86_64/llvm/lib --ark-tool=../../out/%s/clang_x64/arkcompiler/ets_runtime/ark_js_vm --ark-frontend-binary=../../out/%s/clang_x64/arkcompiler/ets_frontend/es2abc --merge-abc-binary=../../out/%s/clang_x64/arkcompiler/ets_frontend/merge_abc --ark-frontend=es2panda '''%(test_dir, test_dir, test_dir, test_dir) if ("test262" == test): print("=== come to test ===") diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn index 7a27c0b9..214ca291 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -12,7 +12,6 @@ # limitations under the License. declare_args() { - another_path = true ark_standalone_build = true use_musl = false build_root = "//arkcompiler/toolchain/build" diff --git a/build/core/gn/BUILD.gn b/build/core/gn/BUILD.gn index 201e2b8b..6de68cc7 100644 --- a/build/core/gn/BUILD.gn +++ b/build/core/gn/BUILD.gn @@ -26,10 +26,18 @@ print("target_os=$target_os, target_cpu=$target_cpu") print() group("default") { - deps = [ - ":ets_frontend", - ":ets_runtime", - ] + if (host_os != "mac") { + deps = [ ":linux_packages" ] + } +} + +group("linux_packages") { + if (host_os != "mac") { + deps = [ + ":ets_frontend($host_toolchain)", + ":ets_runtime($host_toolchain)", + ] + } } group("ets_runtime") { diff --git a/build/prebuilts_download/prebuilts_download.py b/build/prebuilts_download/prebuilts_download.py index 90f4e431..31d2b5cd 100644 --- a/build/prebuilts_download/prebuilts_download.py +++ b/build/prebuilts_download/prebuilts_download.py @@ -179,19 +179,6 @@ def _npm_install(args, code_dir, unzip_dir, unzip_filename): if proc.returncode: raise Exception(err.decode()) -def _node_modules_copy(config, code_dir): - for config_info in config: - src_dir = os.path.join(code_dir, config_info.get('src')) - dest_dir = os.path.join(code_dir, config_info.get('dest')) - use_symlink = config_info.get('use_symlink') - if os.path.exists(os.path.dirname(dest_dir)): - shutil.rmtree(os.path.dirname(dest_dir)) - if use_symlink == 'True': - os.makedirs(os.path.dirname(dest_dir)) - os.symlink(src_dir, dest_dir) - else: - shutil.copytree(src_dir, dest_dir, symlinks=True) - def _file_handle(config, code_dir): for config_info in config: src_dir = ''.join([code_dir, config_info.get('src')]) @@ -251,7 +238,6 @@ def main(): copy_config.extend(darwin_copy_config) _hwcloud_download(args, copy_config, args.bin_dir, args.code_dir) _file_handle(file_handle_config, args.code_dir) - _node_modules_copy(node_modules_copy_config, args.code_dir) if __name__ == '__main__': sys.exit(main()) diff --git a/build/prebuilts_download/prebuilts_download_config.json b/build/prebuilts_download/prebuilts_download_config.json index 216e2a88..adda45ac 100644 --- a/build/prebuilts_download/prebuilts_download_config.json +++ b/build/prebuilts_download/prebuilts_download_config.json @@ -1,13 +1,5 @@ { "prebuilts_download_dir": "../OpenHarmony_canary_prebuilts", - "npm_install_path": ["arkcompiler/ets_frontend/ts2panda"], - "node_modules_copy": [ - { - "src": "arkcompiler/ets_frontend/ts2panda/node_modules", - "dest": "prebuilts/build-tools/common/ts2abc/node_modules", - "use_symlink": "True" - } - ], "file_handle_config": [ { "src": "/prebuilts/clang/ohos/linux-x86_64/clang_linux-x86_64-942740-20220927", @@ -33,11 +25,6 @@ "unzip_dir": "prebuilts/ark_tools", "file_path": "/openharmony/compiler/llvm_prebuilt_libs/ark_js_prebuilts_20220923.tar.gz", "unzip_filename": "ark_js_prebuilts" - }, - { - "unzip_dir": "prebuilts/build-tools/common/nodejs", - "file_path": "/nodejs/v12.18.4/node-v12.18.4-linux-x64.tar.gz", - "unzip_filename": "node-v12.18.4-linux-x64" } ], "linux_copy_config": [ -- Gitee