diff --git a/es2panda/BUILD.gn b/es2panda/BUILD.gn index 6bd30c9e88356a4c903933c014cfdfab79c0a1c9..047ccf5886856b02b544c41ff768cbf645d39d49 100644 --- a/es2panda/BUILD.gn +++ b/es2panda/BUILD.gn @@ -518,3 +518,7 @@ group("es2panda_build") { group("es2panda_build_win") { deps = [ ":es2panda(${toolchain_win})" ] } + +group("es2abc_tests") { + deps = [ "./test:es2abc_parser_tests" ] +} diff --git a/es2panda/test/.gitignore b/es2panda/test/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..0d20b6487c61e7d1bde93acf4a14b7a89083a16d --- /dev/null +++ b/es2panda/test/.gitignore @@ -0,0 +1 @@ +*.pyc diff --git a/es2panda/test/BUILD.gn b/es2panda/test/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..1ce46568c771901823af0600b0b40698efbfd924 --- /dev/null +++ b/es2panda/test/BUILD.gn @@ -0,0 +1,28 @@ +# Copyright (c) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//arkcompiler/ets_frontend/es2panda/es2abc_config.gni") + +action("es2abc_parser_tests") { + script = "${es2abc_root}/test/runner.py" + + deps = es2abc_build_deps + + args = [ + "--no-progress", + "--regression", + rebase_path("${es2abc_build_path}"), + ] + + outputs = [ "${es2abc_build_path}/keep_es2abc_parser_tests_run" ] +} diff --git a/es2panda/test/runner.py b/es2panda/test/runner.py old mode 100644 new mode 100755 index 00a84d294f72299f8d80f5fabb30820645f5cf4a..b4793f848563171a6ca640af868e6da4eba4c82c --- a/es2panda/test/runner.py +++ b/es2panda/test/runner.py @@ -26,7 +26,6 @@ import subprocess import sys import test262util - def is_directory(parser, arg): if not path.isdir(arg): parser.error("The directory '%s' does not exist" % arg)