BUILD.gn 8.1 KB
Newer Older
L
lnlan 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
# Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of
#    conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
#    of conditions and the following disclaimer in the documentation and/or other materials
#    provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be used
#    to endorse or promote products derived from this software without specific prior written
#    permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

import("//build/lite/config/test.gni")
L
lnlan 已提交
31
import("../../config.gni")
L
lnlan 已提交
32

L
lnlan 已提交
33 34 35 36 37 38 39 40 41 42 43 44
common_include_dirs = [
  "//third_party/googletest/googletest/include",
  "../../common/include",
  "//kernel/liteos_a/testsuites/unittest/fs/vfs",
  "//kernel/liteos_a/testsuites/unittest/fs/vfat2",
]

sources_entry = [
  "../../common/osTest.cpp",
  "VfsFatTest.cpp",
]

45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
sources_smoke = [
  "smoke/It_vfs_fat_026.cpp",
]

sources_pressure = [
  "pressure/It_fs_fat_performance_001.cpp",
  "pressure/It_fs_fat_performance_002.cpp",
  "pressure/It_fs_fat_performance_003.cpp",
  "pressure/It_fs_fat_performance_004.cpp",
  "pressure/It_fs_fat_performance_005.cpp",
  "pressure/It_fs_fat_performance_006.cpp",
  "pressure/It_fs_fat_performance_007.cpp",
  "pressure/It_fs_fat_performance_008.cpp",
  "pressure/It_fs_fat_performance_013.cpp",
  "pressure/It_fs_fat_performance_014.cpp",
  "pressure/It_fs_fat_performance_015.cpp",
  "pressure/It_fs_fat_performance_016.cpp",

  "pressure/It_fs_fat_pressure_029.cpp",
  "pressure/It_fs_fat_pressure_030.cpp",
  "pressure/It_fs_fat_pressure_031.cpp",
  "pressure/It_fs_fat_pressure_038.cpp",
  "pressure/It_fs_fat_pressure_040.cpp",
  "pressure/It_fs_fat_pressure_041.cpp",
  "pressure/It_fs_fat_pressure_042.cpp",
  "pressure/It_fs_fat_pressure_301.cpp",
  "pressure/It_fs_fat_pressure_302.cpp",
  "pressure/It_fs_fat_pressure_303.cpp",
  "pressure/It_fs_fat_pressure_305.cpp",
  "pressure/It_fs_fat_pressure_306.cpp",
  "pressure/It_fs_fat_pressure_309.cpp",
L
lnlan 已提交
76

77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
  "pressure/It_vfs_fat_mutipthread_003.cpp",
  "pressure/It_vfs_fat_mutipthread_004.cpp",
  "pressure/It_vfs_fat_mutipthread_005.cpp",
  "pressure/It_vfs_fat_mutipthread_006.cpp",
  "pressure/It_vfs_fat_mutipthread_008.cpp",
  "pressure/It_vfs_fat_mutipthread_009.cpp",
  "pressure/It_vfs_fat_mutipthread_010.cpp",
  "pressure/It_vfs_fat_mutipthread_012.cpp",
  "pressure/It_vfs_fat_mutipthread_014.cpp",
  "pressure/It_vfs_fat_mutipthread_016.cpp",
  "pressure/It_vfs_fat_mutipthread_017.cpp",
  "pressure/It_vfs_fat_mutipthread_018.cpp",
  "pressure/It_vfs_fat_mutipthread_019.cpp",
  "pressure/It_vfs_fat_mutipthread_020.cpp",
  "pressure/It_vfs_fat_mutipthread_021.cpp",
  "pressure/It_vfs_fat_mutipthread_022.cpp",
  "pressure/It_vfs_fat_mutipthread_023.cpp",
  "pressure/It_vfs_fat_mutipthread_024.cpp",
  "pressure/It_vfs_fat_mutipthread_027.cpp",
  "pressure/It_vfs_fat_mutipthread_029.cpp",
  "pressure/It_vfs_fat_mutipthread_030.cpp",
  "pressure/It_vfs_fat_mutipthread_032.cpp",
  "pressure/It_vfs_fat_mutipthread_033.cpp",
  "pressure/It_vfs_fat_mutipthread_035.cpp",
  "pressure/It_vfs_fat_mutipthread_036.cpp",
  "pressure/It_vfs_fat_mutipthread_038.cpp",
  "pressure/It_vfs_fat_mutipthread_039.cpp",
  "pressure/It_vfs_fat_mutipthread_040.cpp",
  "pressure/It_vfs_fat_mutipthread_041.cpp",
  "pressure/It_vfs_fat_mutipthread_042.cpp",
  "pressure/It_vfs_fat_mutipthread_043.cpp",
  "pressure/It_vfs_fat_mutipthread_044.cpp",
  "pressure/It_vfs_fat_mutipthread_045.cpp",
  "pressure/It_vfs_fat_mutipthread_046.cpp",
  "pressure/It_vfs_fat_mutipthread_047.cpp",
  "pressure/It_vfs_fat_mutipthread_048.cpp",
  "pressure/It_vfs_fat_mutipthread_049.cpp",
  "pressure/It_vfs_fat_mutipthread_050.cpp",
]
L
lnlan 已提交
116

117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184
sources_full = [
  "full/It_vfs_fat_066.cpp",
  "full/It_vfs_fat_068.cpp",
  "full/It_vfs_fat_072.cpp",
  "full/It_vfs_fat_073.cpp",
  "full/It_vfs_fat_074.cpp",
  "full/It_vfs_fat_496.cpp",
  "full/It_vfs_fat_497.cpp",
  "full/It_vfs_fat_498.cpp",
  "full/It_vfs_fat_499.cpp",
  "full/It_vfs_fat_500.cpp",
  "full/It_vfs_fat_501.cpp",
  "full/It_vfs_fat_502.cpp",
  "full/It_vfs_fat_503.cpp",
  "full/It_vfs_fat_504.cpp",
  "full/It_vfs_fat_506.cpp",
  "full/It_vfs_fat_507.cpp",
  "full/It_vfs_fat_508.cpp",
  "full/It_vfs_fat_509.cpp",
  "full/It_vfs_fat_510.cpp",
  "full/It_vfs_fat_511.cpp",
  "full/It_vfs_fat_512.cpp",
  "full/It_vfs_fat_513.cpp",
  "full/It_vfs_fat_514.cpp",
  "full/It_vfs_fat_515.cpp",
  "full/It_vfs_fat_516.cpp",
  "full/It_vfs_fat_517.cpp",
  "full/It_vfs_fat_518.cpp",
  "full/It_vfs_fat_519.cpp",
  "full/It_vfs_fat_662.cpp",
  "full/It_vfs_fat_663.cpp",
  "full/It_vfs_fat_664.cpp",
  "full/It_vfs_fat_665.cpp",
  "full/It_vfs_fat_666.cpp",
  "full/It_vfs_fat_667.cpp",
  "full/It_vfs_fat_668.cpp",
  "full/It_vfs_fat_669.cpp",
  "full/It_vfs_fat_670.cpp",
  "full/It_vfs_fat_671.cpp",
  "full/It_vfs_fat_672.cpp",
  "full/It_vfs_fat_673.cpp",
  "full/It_vfs_fat_674.cpp",
  "full/It_vfs_fat_675.cpp",
  "full/It_vfs_fat_676.cpp",
  "full/It_vfs_fat_677.cpp",
  "full/It_vfs_fat_678.cpp",
  "full/It_vfs_fat_679.cpp",
  "full/It_vfs_fat_680.cpp",
  "full/It_vfs_fat_681.cpp",
  "full/It_vfs_fat_682.cpp",
  "full/It_vfs_fat_683.cpp",
  "full/It_vfs_fat_684.cpp",
  "full/It_vfs_fat_685.cpp",
  "full/It_vfs_fat_686.cpp",
  "full/It_vfs_fat_687.cpp",
  "full/It_vfs_fat_692.cpp",
  "full/It_vfs_fat_693.cpp",
  "full/It_vfs_fat_694.cpp",
  "full/It_vfs_fat_870.cpp",
  "full/It_vfs_fat_872.cpp",
  "full/It_vfs_fat_873.cpp",
  "full/It_vfs_fat_874.cpp",
  "full/It_vfs_fat_875.cpp",
  "full/It_vfs_fat_902.cpp",
  "full/It_vfs_fat_903.cpp",
  "full/It_vfs_fat_904.cpp",
  "full/It_vfs_fat_909.cpp",
]
L
lnlan 已提交
185

186 187 188 189
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
  unittest("liteos_a_fs_vfat_unittest_door") {
    output_extension = "bin"
    output_dir = "$root_out_dir/test/unittest/kernel"
L
lnlan 已提交
190
    include_dirs = common_include_dirs
191 192 193 194 195 196 197
    sources = sources_entry
    sources += sources_smoke
    sources_full = []
    sources += sources_full
    sources_pressure = []
    sources += sources_pressure
    configs = [ "../..:public_config_for_door" ]
L
lnlan 已提交
198
    deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
L
lnlan 已提交
199
  }
L
lnlan 已提交
200 201
}

202
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
L
lnlan 已提交
203 204 205 206 207
  unittest("liteos_a_fs_vfat_unittest") {
    output_extension = "bin"
    output_dir = "$root_out_dir/test/unittest/kernel"
    include_dirs = common_include_dirs
    sources = sources_entry
208 209 210 211 212 213
    sources += sources_smoke
    sources += sources_full
    sources_pressure = []
    sources += sources_pressure
    configs = [ "../..:public_config_for_all" ]
    deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
L
lnlan 已提交
214 215 216
  }
}

217 218
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_HIGH) {
  unittest("liteos_a_fs_vfat_unittest_pressure") {
L
lnlan 已提交
219 220 221 222
    output_extension = "bin"
    output_dir = "$root_out_dir/test/unittest/kernel"
    include_dirs = common_include_dirs
    sources = sources_entry
223 224 225 226 227 228 229
    sources_smoke = []
    sources += sources_smoke
    sources_full = []
    sources += sources_full
    sources += sources_pressure
    configs = [ "../..:public_config_for_pressure" ]
    deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
L
lnlan 已提交
230
  }
231
}