BUILD.gn 6.1 KB
Newer Older
M
mamingshuai 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# Copyright (c) 2020-2021 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("//build/lite/config/subsystem/aafwk/config.gni")
15
import("//build/lite/config/test.gni")
H
hujixiang1 已提交
16
import("//test/xts/tools/lite/build/suite_lite.gni")
M
mamingshuai 已提交
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

lite_component("acts_component") {
  all_features = []
  features = []
  if (ohos_xts_test_args != "") {
    args = [
      "--method_name",
      "get_target_modules",
      "--arguments",
      "all_features=${ohos_xts_test_args}",
    ]
    all_features +=
        exec_script(rebase_path("//test/xts/tools/lite/build/utils.py"),
                    args,
                    "list lines")
  } else {
    if (ohos_kernel_type == "liteos_m") {
      all_features += [
        "//test/xts/acts/communication_lite/lwip_hal:ActsLwipTest",
        "//test/xts/acts/communication_lite/wifiservice_hal:ActsWifiServiceTest",
J
jiyong 已提交
37 38 39
        "//test/xts/acts/utils_lite/file_hal:ActsUtilsFileTest",
        "//test/xts/acts/startup_lite/syspara_hal:ActsParameterTest",
        "//test/xts/acts/iot_hardware_lite/iot_controller_hal:ActsWifiIotTest",
M
mamingshuai 已提交
40
        "//test/xts/acts/kernel_lite/kernelcmsis_hal:ActsCMSISTest",
J
jiyong 已提交
41
        "//test/xts/acts/utils_lite/kv_store_hal:ActsKvStoreTest",
H
hujixiang1 已提交
42

W
wanghaixiang 已提交
43
        #"//test/xts/acts/security_lite/huks_hal:ActsSecurityDataTest",
H
hujixiang1 已提交
44
        "//test/xts/acts/security_lite/huks/liteos_m_adapter:ActsHuksHalFunctionTest",
S
stesen 已提交
45
        "//test/xts/acts/hiviewdfx_lite/hilog_hal:ActsDfxFuncTest",
46
        "//test/xts/acts/hiviewdfx_lite/hievent_hal:ActsHieventLiteTest",
M
mamingshuai 已提交
47

Z
zhouhouxin 已提交
48
        "//test/xts/acts/distributed_schedule_lite/system_ability_manager_hal:ActsSamgrTest",
J
jiyong 已提交
49
        "//test/xts/acts/update_lite/dupdate_hal:ActsUpdaterFuncTest",
R
root 已提交
50
        "//test/xts/acts/startup_lite/bootstrap_hal:ActsBootstrapTest",
Y
ye-xiangbin 已提交
51 52

        # "//test/xts/acts/applications/kitframework:ActsKitFwkApiTest",
M
mamingshuai 已提交
53 54 55 56 57
      ]
    } else if (ohos_kernel_type == "liteos_a") {
      all_features += [
        "//test/xts/acts/kernel_lite:ActsKernelTest",
        "//test/xts/acts/security_lite:securitytest",
J
jiyong 已提交
58 59
        "//test/xts/acts/utils_lite/kv_store_posix:ActsKvStoreTest",
        "//test/xts/acts/startup_lite/syspara_posix:ActsParameterTest",
M
mamingshuai 已提交
60
        "//test/xts/acts/startup_lite/bootstrap_posix:ActsBootstrapTest",
61
        "//test/xts/acts/multimedia_lite/camera_lite_posix/camera_native:ActsMediaCameraTest",
M
mamingshuai 已提交
62
        "//test/xts/acts/open_posix_testsuite/conformance/interfaces:ActsOpenPosixTest",
H
hujixiang1 已提交
63

L
LeeTestNady 已提交
64
        #"//test/xts/acts/multimedia_lite/media_lite_posix/player_native:ActsMediaPlayerTest",
Z
zhouhouxin 已提交
65
        "//test/xts/acts/distributed_schedule_lite/system_ability_manager_posix:ActsSamgrTest",
M
mamingshuai 已提交
66

Z
zhouhouxin 已提交
67
        #"//test/xts/acts/distributedschedule_lite/distributed_schedule_posix:ActsDMSTest",
M
mamingshuai 已提交
68
        "//test/xts/acts/security_lite/permission_posix/pms:ActsPMSTest",
S
stesen 已提交
69
        "//test/xts/acts/hiviewdfx_lite/hilog_posix:ActsHilogTest",
H
hujixiang1 已提交
70

L
LeeTestNady 已提交
71
        "//test/xts/acts/multimedia_lite/media_lite_posix/recorder_native:ActsMediaRecorderTest",
M
mamingshuai 已提交
72

J
jiyong 已提交
73
        "//test/xts/acts/appexecfwk_lite/appexecfwk_posix:ActsBundleMgrTest",
J
jiyong 已提交
74
        "//test/xts/acts/aafwk_lite/ability_posix:ActsAbilityMgrTest",
M
mamingshuai 已提交
75 76
        "//test/xts/acts/communication_lite/lwip_posix:ActsLwipTest",

G
Gloria Yin 已提交
77
        "//test/xts/acts/ai_lite/ai_engine_posix/base:ActsAiEngineTest",
M
mamingshuai 已提交
78 79
        "//test/xts/acts/global_lite:ActsGlobalTest",
        "//test/xts/acts/sensors_lite:sensorstest",
J
jiyong 已提交
80
        "//test/xts/acts/update_lite/dupdate_posix:ActsUpdateTest",
M
mamingshuai 已提交
81 82 83
      ]
    } else if (ohos_kernel_type == "linux") {
      all_features += [
J
jiyong 已提交
84 85
        "//test/xts/acts/utils_lite/kv_store_posix:ActsKvStoreTest",
        "//test/xts/acts/startup_lite/syspara_posix:ActsParameterTest",
86
        "//test/xts/acts/startup_lite/bootstrap_posix:ActsBootstrapTest",
87
        "//test/xts/acts/communication_lite/lwip_posix:ActsLwipTest",
H
hujixiang1 已提交
88

W
wanghaixiang 已提交
89
        #"//test/xts/acts/security_lite/huks_posix:ActsSecurityDataTest",
H
hujixiang1 已提交
90 91
        "//test/xts/acts/security_lite/permission_posix/pms:ActsPMSTest",

L
LeeTestNady 已提交
92
        #"//test/xts/acts/multimedia_lite/camera_lite_posix/camera_native:ActsMediaCameraTest",
L
LeeTestNady 已提交
93
        #"//test/xts/acts/multimedia_lite/media_lite_posix/player_native:ActsMediaPlayerTest",
L
LeeTestNady 已提交
94
        #"//test/xts/acts/multimedia_lite/media_lite_posix/recorder_native:ActsMediaRecorderTest",
Z
zhouhouxin 已提交
95
        "//test/xts/acts/distributed_schedule_lite/system_ability_manager_posix:ActsSamgrTest",
J
jiyong 已提交
96
        "//test/xts/acts/appexecfwk_lite/appexecfwk_posix:ActsBundleMgrTest",
J
jiyong 已提交
97
        "//test/xts/acts/aafwk_lite/ability_posix:ActsAbilityMgrTest",
G
Gloria Yin 已提交
98
        "//test/xts/acts/ai_lite/ai_engine_posix/base:ActsAiEngineTest",
M
mamingshuai 已提交
99 100 101 102
      ]
    }
  }

103
  if (ohos_build_type == "debug" && ohos_test_args != "notest") {
M
mamingshuai 已提交
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
    _all_features = ""
    _product_json = rebase_path("${product_path}/config.json")
    foreach(one_feature, all_features) {
      _all_features = _all_features + one_feature + ","
    }
    _args = [
      "--method_name",
      "filter_by_subsystem",
      "--arguments",
      "testsuites=${_all_features}#product_json=${_product_json}",
    ]
    features += exec_script(rebase_path("//test/xts/tools/lite/build/utils.py"),
                            _args,
                            "list lines")
  }
}

test_suite("acts") {
  deps = [ ":acts_component" ]
J
jiyong 已提交
123
  version = "OpenHarmony-ACTS-1.0.1"
M
mamingshuai 已提交
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
  if (ohos_kernel_type == "liteos_a") {
    deps += [ "//test/xts/tools/lite/others/query:query" ]
    copy("query_copy") {
      sources = [ "$root_out_dir/bin/query.bin" ]
      outputs = [ "$root_out_dir/suites/acts/resource/tools/query.bin" ]
    }
  }
}

generate_notice_file("acts_notice_file") {
  module_name = "acts"
  module_source_dir_list = [
    "//third_party/googletest",
    "//third_party/unity",
    "//third_party/bounds_checking_function",
    "//third_party/iniparser",
  ]
}