From 3d9ae7e005c45cf6a03ba4b5c48ce4b8722611d2 Mon Sep 17 00:00:00 2001 From: lnlan Date: Sat, 29 May 2021 16:32:21 +0800 Subject: [PATCH] =?UTF-8?q?feat(build):=20hb=E7=BC=96=E8=AF=91=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0notest=E9=80=89=E9=A1=B9=EF=BC=8C=E5=8F=AF=E5=8E=BB?= =?UTF-8?q?=E9=99=A4=E6=89=80=E6=9C=89=E7=94=A8=E4=BE=8B=E7=9A=84=E6=9E=84?= =?UTF-8?q?=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【背景】用例数量较多,全量编译过于耗时。 【修改方案】 1. hb编译添加notest选项,hb build -t notest -f 编译时去除用例的构建。 【影响】 对现有的产品编译不会有影响。 Change-Id: I9286bdc1b825ac53679577100c89febed238b435 --- build_lite/BUILD.gn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build_lite/BUILD.gn b/build_lite/BUILD.gn index 831b3a171..652c5eb4e 100644 --- a/build_lite/BUILD.gn +++ b/build_lite/BUILD.gn @@ -13,6 +13,7 @@ import("//build/lite/config/subsystem/aafwk/config.gni") import("//test/xts/tools/lite/build/suite_lite.gni") +import("//build/lite/config/test.gni") lite_component("acts_component") { all_features = [] @@ -93,7 +94,7 @@ lite_component("acts_component") { } } - if (ohos_build_type == "debug") { + if (ohos_build_type == "debug" && ohos_test_args != "notest") { _all_features = "" _product_json = rebase_path("${product_path}/config.json") foreach(one_feature, all_features) { -- GitLab