10d163575Sopenharmony_ci# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved. 20d163575Sopenharmony_ci# Copyright (c) 2020-2023 Huawei Device Co., Ltd. All rights reserved. 30d163575Sopenharmony_ci# 40d163575Sopenharmony_ci# Redistribution and use in source and binary forms, with or without modification, 50d163575Sopenharmony_ci# are permitted provided that the following conditions are met: 60d163575Sopenharmony_ci# 70d163575Sopenharmony_ci# 1. Redistributions of source code must retain the above copyright notice, this list of 80d163575Sopenharmony_ci# conditions and the following disclaimer. 90d163575Sopenharmony_ci# 100d163575Sopenharmony_ci# 2. Redistributions in binary form must reproduce the above copyright notice, this list 110d163575Sopenharmony_ci# of conditions and the following disclaimer in the documentation and/or other materials 120d163575Sopenharmony_ci# provided with the distribution. 130d163575Sopenharmony_ci# 140d163575Sopenharmony_ci# 3. Neither the name of the copyright holder nor the names of its contributors may be used 150d163575Sopenharmony_ci# to endorse or promote products derived from this software without specific prior written 160d163575Sopenharmony_ci# permission. 170d163575Sopenharmony_ci# 180d163575Sopenharmony_ci# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 190d163575Sopenharmony_ci# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 200d163575Sopenharmony_ci# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 210d163575Sopenharmony_ci# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 220d163575Sopenharmony_ci# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 230d163575Sopenharmony_ci# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 240d163575Sopenharmony_ci# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 250d163575Sopenharmony_ci# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 260d163575Sopenharmony_ci# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 270d163575Sopenharmony_ci# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 280d163575Sopenharmony_ci# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 290d163575Sopenharmony_ci 300d163575Sopenharmony_ciimport("$root_out_dir/config.gni") 310d163575Sopenharmony_ciTEST_UNITTEST_DIR = rebase_path(".") 320d163575Sopenharmony_cideclare_args() { 330d163575Sopenharmony_ci liteos_container_test_enable = false 340d163575Sopenharmony_ci liteos_fuzz_test_enable = false 350d163575Sopenharmony_ci} 360d163575Sopenharmony_ci 370d163575Sopenharmony_ciTEST_LEVEL_LOW = 1 380d163575Sopenharmony_ciTEST_LEVEL_MIDDLE = 3 390d163575Sopenharmony_ciTEST_LEVEL_HIGH = 5 400d163575Sopenharmony_ci 410d163575Sopenharmony_ci# 0: don`t generate 420d163575Sopenharmony_ci# TEST_LEVEL_LOW: only generate xxx_unittest_door.bin (smoke) 430d163575Sopenharmony_ci# TEST_LEVEL_MIDDLE: generate xxx_unittest_door.bin (smoke) & xxx_unittest.bin (smoke + full) 440d163575Sopenharmony_ci# TEST_LEVEL_HIGH: generate xxx_unittest_door.bin (smoke) & xxx_unittest.bin (smoke + full) & xxx_unittest_pressure.bin (pressure) 450d163575Sopenharmony_ciLOSCFG_USER_TEST_LEVEL = TEST_LEVEL_HIGH 460d163575Sopenharmony_ci 470d163575Sopenharmony_ci# "default": depend on board_name 480d163575Sopenharmony_ci# "enable": those testsuites testing for SMP is enable 490d163575Sopenharmony_ci# "disable": those testsuites is disable 500d163575Sopenharmony_ciLOSCFG_USER_TEST_SMP = "default" 510d163575Sopenharmony_ci 520d163575Sopenharmony_ci########## basic test ########## 530d163575Sopenharmony_ci# Control switch for basic function test 540d163575Sopenharmony_ciLOSCFG_USER_TEST_BASIC = true 550d163575Sopenharmony_ci 560d163575Sopenharmony_ci# Module list 570d163575Sopenharmony_ciLOSCFG_USER_TEST_DYNLOAD = true 580d163575Sopenharmony_ciLOSCFG_USER_TEST_EXC = true 590d163575Sopenharmony_ciLOSCFG_USER_TEST_MEM_SHM = true 600d163575Sopenharmony_ciLOSCFG_USER_TEST_MEM_VM = true 610d163575Sopenharmony_ci 620d163575Sopenharmony_ci########## process test ########## 630d163575Sopenharmony_ci# Control switch for process&pthread function test 640d163575Sopenharmony_ciLOSCFG_USER_TEST_PROCESS_THREAD = true 650d163575Sopenharmony_ci 660d163575Sopenharmony_ci# Module list 670d163575Sopenharmony_ciLOSCFG_USER_TEST_PROCESS_BASIC_PROCESS = true 680d163575Sopenharmony_ciLOSCFG_USER_TEST_PROCESS_BASIC_PTHREAD = true 690d163575Sopenharmony_ciLOSCFG_USER_TEST_PROCESS_LOCK_MUTEX = true 700d163575Sopenharmony_ciLOSCFG_USER_TEST_PROCESS_LOCK_RWLOCK = true 710d163575Sopenharmony_ciLOSCFG_USER_TEST_PROCESS_LOCK_SPINLOCK = true 720d163575Sopenharmony_ci 730d163575Sopenharmony_ci########## extended test ########## 740d163575Sopenharmony_ci# Control switch for extended function test 750d163575Sopenharmony_ciLOSCFG_USER_TEST_EXTENDED = true 760d163575Sopenharmony_ci 770d163575Sopenharmony_ci# Module list 780d163575Sopenharmony_ciLOSCFG_USER_TEST_IPC = false 790d163575Sopenharmony_ciLOSCFG_USER_TEST_LITEIPC = false 800d163575Sopenharmony_ciLOSCFG_USER_TEST_SIGNAL = true 810d163575Sopenharmony_ciLOSCFG_USER_TEST_TRACE = false 820d163575Sopenharmony_ci 830d163575Sopenharmony_ci########## drivers test ########## 840d163575Sopenharmony_ci# Control switch for drivers function test 850d163575Sopenharmony_ciLOSCFG_USER_TEST_DRIVERS = true 860d163575Sopenharmony_ci 870d163575Sopenharmony_ci# Module list 880d163575Sopenharmony_ciLOSCFG_USER_TEST_DRIVERS_HID = true 890d163575Sopenharmony_ciLOSCFG_USER_TEST_DRIVERS_STORAGE = true 900d163575Sopenharmony_ci 910d163575Sopenharmony_ci########## fs test ########## 920d163575Sopenharmony_ci# Control switch for fs function test 930d163575Sopenharmony_ciLOSCFG_USER_TEST_FS = true 940d163575Sopenharmony_ci 950d163575Sopenharmony_ci# Module list 960d163575Sopenharmony_ciLOSCFG_USER_TEST_FS_JFFS = false 970d163575Sopenharmony_ciLOSCFG_USER_TEST_FS_PROC = false 980d163575Sopenharmony_ciLOSCFG_USER_TEST_FS_VFAT = false 990d163575Sopenharmony_ci 1000d163575Sopenharmony_ci########## libc test ########## 1010d163575Sopenharmony_ci# Control switch for libc & posix function test 1020d163575Sopenharmony_ciLOSCFG_USER_TEST_LIBC = true 1030d163575Sopenharmony_ci 1040d163575Sopenharmony_ci# Module list 1050d163575Sopenharmony_ciLOSCFG_USER_TEST_LIBC_IO = true 1060d163575Sopenharmony_ciLOSCFG_USER_TEST_LIBC_MISC = true 1070d163575Sopenharmony_ciLOSCFG_USER_TEST_LIBC_POSIX_MEM = true 1080d163575Sopenharmony_ciLOSCFG_USER_TEST_LIBC_POSIX_MQUEUE = true 1090d163575Sopenharmony_ciLOSCFG_USER_TEST_LIBC_POSIX_PTHREAD = false 1100d163575Sopenharmony_ciLOSCFG_USER_TEST_LIBC_SYS = true 1110d163575Sopenharmony_ciLOSCFG_USER_TEST_LIBC_TIME_CLOCK = true 1120d163575Sopenharmony_ciLOSCFG_USER_TEST_LIBC_TIME_TIMER = true 1130d163575Sopenharmony_ciLOSCFG_USER_TEST_LIBC_UTIL = true 1140d163575Sopenharmony_ci 1150d163575Sopenharmony_ci########## net test ########## 1160d163575Sopenharmony_ci# Control switch for network function test 1170d163575Sopenharmony_ciLOSCFG_USER_TEST_NET = true 1180d163575Sopenharmony_ci 1190d163575Sopenharmony_ci# Module list 1200d163575Sopenharmony_ciLOSCFG_USER_TEST_NET_NETDB = true 1210d163575Sopenharmony_ciLOSCFG_USER_TEST_NET_RESOLV = true 1220d163575Sopenharmony_ciLOSCFG_USER_TEST_NET_SOCKET = true 1230d163575Sopenharmony_ci 1240d163575Sopenharmony_ci########## security test ########## 1250d163575Sopenharmony_ci# Control switch for security function test 1260d163575Sopenharmony_ciLOSCFG_USER_TEST_SECURITY = true 1270d163575Sopenharmony_ci 1280d163575Sopenharmony_ci# Module list 1290d163575Sopenharmony_ciLOSCFG_USER_TEST_SECURITY_CAPABILITY = true 1300d163575Sopenharmony_ciLOSCFG_USER_TEST_SECURITY_REUGID = true 1310d163575Sopenharmony_ciLOSCFG_USER_TEST_SECURITY_VID = true 1320d163575Sopenharmony_ci 1330d163575Sopenharmony_ciLOSCFG_USER_TEST_PROCESS_FS = false 1340d163575Sopenharmony_ciif (defined(LOSCFG_PROC_PROCESS_DIR) || liteos_container_test_enable == true) { 1350d163575Sopenharmony_ci LOSCFG_USER_TEST_PROCESS_FS = true 1360d163575Sopenharmony_ci} 1370d163575Sopenharmony_ci 1380d163575Sopenharmony_ci########## container test ########## 1390d163575Sopenharmony_ciLOSCFG_USER_TEST_CONTAINER = false 1400d163575Sopenharmony_ciLOSCFG_USER_TEST_PID_CONTAINER = false 1410d163575Sopenharmony_ciLOSCFG_USER_TEST_UTS_CONTAINER = false 1420d163575Sopenharmony_ciLOSCFG_USER_TEST_MNT_CONTAINER = false 1430d163575Sopenharmony_ciLOSCFG_USER_TEST_IPC_CONTAINER = false 1440d163575Sopenharmony_ciLOSCFG_USER_TEST_TIME_CONTAINER = false 1450d163575Sopenharmony_ciLOSCFG_USER_TEST_USER_CONTAINER = false 1460d163575Sopenharmony_ciLOSCFG_USER_TEST_NET_CONTAINER = false 1470d163575Sopenharmony_ciif (defined(LOSCFG_KERNEL_CONTAINER) || liteos_container_test_enable == true) { 1480d163575Sopenharmony_ci LOSCFG_USER_TEST_CONTAINER = true 1490d163575Sopenharmony_ci if (defined(LOSCFG_PID_CONTAINER) || liteos_container_test_enable == true) { 1500d163575Sopenharmony_ci LOSCFG_USER_TEST_PID_CONTAINER = true 1510d163575Sopenharmony_ci } 1520d163575Sopenharmony_ci if (defined(LOSCFG_UTS_CONTAINER) || liteos_container_test_enable == true) { 1530d163575Sopenharmony_ci LOSCFG_USER_TEST_UTS_CONTAINER = true 1540d163575Sopenharmony_ci } 1550d163575Sopenharmony_ci if (defined(LOSCFG_MNT_CONTAINER) || liteos_container_test_enable == true) { 1560d163575Sopenharmony_ci LOSCFG_USER_TEST_MNT_CONTAINER = true 1570d163575Sopenharmony_ci } 1580d163575Sopenharmony_ci if (defined(LOSCFG_IPC_CONTAINER) || liteos_container_test_enable == true) { 1590d163575Sopenharmony_ci LOSCFG_USER_TEST_IPC_CONTAINER = true 1600d163575Sopenharmony_ci } 1610d163575Sopenharmony_ci if (defined(LOSCFG_TIME_CONTAINER) || liteos_container_test_enable == true) { 1620d163575Sopenharmony_ci LOSCFG_USER_TEST_TIME_CONTAINER = true 1630d163575Sopenharmony_ci } 1640d163575Sopenharmony_ci if (defined(LOSCFG_USER_CONTAINER) || liteos_container_test_enable == true) { 1650d163575Sopenharmony_ci LOSCFG_USER_TEST_USER_CONTAINER = true 1660d163575Sopenharmony_ci } 1670d163575Sopenharmony_ci if (defined(LOSCFG_NET_CONTAINER) || liteos_container_test_enable == true) { 1680d163575Sopenharmony_ci LOSCFG_USER_TEST_NET_CONTAINER = true 1690d163575Sopenharmony_ci } 1700d163575Sopenharmony_ci} 1710d163575Sopenharmony_ci 1720d163575Sopenharmony_ciLOSCFG_USER_TEST_PROCESS_PLIMITS = false 1730d163575Sopenharmony_ciif (defined(LOSCFG_KERNEL_PLIMITS) || liteos_container_test_enable == true) { 1740d163575Sopenharmony_ci LOSCFG_USER_TEST_PROCESS_PLIMITS = true 1750d163575Sopenharmony_ci} 1760d163575Sopenharmony_ci 1770d163575Sopenharmony_ci########## fuzz test ########## 1780d163575Sopenharmony_ciLOSCFG_USER_FUZZ_TEST = false 1790d163575Sopenharmony_ciif (liteos_fuzz_test_enable == true) { 1800d163575Sopenharmony_ci LOSCFG_USER_FUZZ_TEST = true 1810d163575Sopenharmony_ci} 182