1# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved. 2# Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without modification, 5# are permitted provided that the following conditions are met: 6# 7# 1. Redistributions of source code must retain the above copyright notice, this list of 8# conditions and the following disclaimer. 9# 10# 2. Redistributions in binary form must reproduce the above copyright notice, this list 11# of conditions and the following disclaimer in the documentation and/or other materials 12# provided with the distribution. 13# 14# 3. Neither the name of the copyright holder nor the names of its contributors may be used 15# to endorse or promote products derived from this software without specific prior written 16# permission. 17# 18# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 20# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 22# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 23# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 25# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 26# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 27# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 28# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 30import("//build/lite/config/test.gni") 31import("../config.gni") 32 33common_include_dirs = [ 34 "//third_party/googletest/googletest/include", 35 "../common/include", 36 "../IO", 37] 38 39sources_entry = [ 40 "../common/osTest.cpp", 41 "io_test.cpp", 42] 43 44sources_smoke = [ 45 "smoke/IO_test_005.cpp", 46 "smoke/IO_test_008.cpp", 47 "smoke/IO_test_010.cpp", 48 "smoke/IO_test_013.cpp", 49] 50 51sources_full = [ 52 "full/IO_test_confstr_001.cpp", 53 "full/IO_test_dcgettext_001.cpp", 54 "full/IO_test_dcgettext_002.cpp", 55 "full/IO_test_dcngettext_001.cpp", 56 "full/IO_test_dcngettext_002.cpp", 57 "full/IO_test_dngettext_001.cpp", 58 "full/IO_test_dngettext_002.cpp", 59 "full/IO_test_duplocale_001.cpp", 60 "full/IO_test_locale_001.cpp", 61 "full/IO_test_locale_002.cpp", 62 "full/IO_test_ngettext_001.cpp", 63 "full/IO_test_nl_langinfo_001.cpp", 64 "full/IO_test_nl_langinfo_l_001.cpp", 65 "full/IO_test_strcasecmp_l_001.cpp", 66 "full/IO_test_strcasecmp_l_002.cpp", 67 "full/IO_test_strfmon_l_001.cpp", 68 "full/IO_test_strfmon_l_002.cpp", 69 "full/It_locale_localeconv_001.cpp", 70 "full/It_stdio_fputws_001.cpp", 71 "full/It_stdio_fwprintf_001.cpp", 72 "full/It_stdio_getc_unlocked_001.cpp", 73 "full/It_stdio_hasmntopt_001.cpp", 74 "full/It_stdio_mblen_001.cpp", 75 "full/It_stdio_mbrlen_001.cpp", 76 "full/It_stdio_putwc_001.cpp", 77 "full/It_stdio_readv_001.cpp", 78 "full/It_stdio_rindex_001.cpp", 79 "full/It_stdio_setlogmask_001.cpp", 80 "full/It_stdlib_gcvt_001.cpp", 81 "full/It_stdlib_poll_002.cpp", 82 "full/It_stdlib_poll_003.cpp", 83 "full/IO_test_gettext_001.cpp", 84 "full/IO_test_strncasecmp_l_001.cpp", 85 "full/IO_test_strncasecmp_l_002.cpp", 86 "full/IO_test_ppoll_001.cpp", 87 "full/IO_test_ppoll_002.cpp", 88 "full/IO_test_ppoll_003.cpp", 89] 90 91if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) { 92 unittest("liteos_a_io_unittest_door") { 93 output_extension = "bin" 94 output_dir = "$root_out_dir/test/unittest/kernel" 95 include_dirs = common_include_dirs 96 sources = sources_entry 97 sources += sources_smoke 98 sources_full = [] 99 sources += sources_full 100 configs = [ "..:public_config_for_door" ] 101 deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 102 } 103} 104 105if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) { 106 unittest("liteos_a_io_unittest") { 107 output_extension = "bin" 108 output_dir = "$root_out_dir/test/unittest/kernel" 109 include_dirs = common_include_dirs 110 sources = sources_entry 111 sources += sources_smoke 112 sources += sources_full 113 configs = [ "..:public_config_for_all" ] 114 deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 115 } 116} 117