xref: /aosp_15_r20/external/icu/icu4c/source/test/fuzzer/Android.bp (revision 0e209d3975ff4a8c132096b14b0e9364a753506e)
1// Copyright (C) 2021 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package {
16    default_team: "trendy_team_java_core_libraries",
17    default_visibility: [
18        "//external/icu:__subpackages__",
19    ],
20    // See: http://go/android-license-faq
21    // A large-scale-change added 'default_applicable_licenses' to import
22    // all of the 'license_kinds' from "external_icu_icu4c_license"
23    // to get the below license kinds:
24    //   SPDX-license-identifier-Unicode-DFS
25    default_applicable_licenses: ["external_icu_icu4c_license"],
26}
27
28cc_defaults {
29    name: "libicu_fuzzer_defaults",
30    defaults: ["icu_test_defaults"],
31    srcs: [
32        "locale_util.cpp",
33    ],
34    fuzz_config: {
35        componentid: 24949, // Bugs are filed to the "Core library" component
36        hotlists: ["930429"], // The hotlist applied on the bug
37        fuzz_on_haiku_device: true,
38        // Email addresses of users who should be CC'd on bugs.
39        cc: [
40            "[email protected]",
41            "[email protected]",
42        ],
43        // acknowledged in the Android Security Bulletin for any CVEs found by this fuzz target.
44        acknowledgement: [
45            "Victor Chang of Google",
46            "ICU Contributors of Google",
47        ],
48    },
49}
50
51cc_fuzz {
52    name: "libicu_break_iterator_fuzzer",
53    defaults: ["libicu_fuzzer_defaults"],
54    srcs: ["break_iterator_fuzzer.cpp"],
55}
56
57cc_fuzz {
58    name: "libicu_collator_compare_fuzzer",
59    defaults: ["libicu_fuzzer_defaults"],
60    srcs: ["collator_compare_fuzzer.cpp"],
61}
62
63cc_fuzz {
64    name: "libicu_collator_rulebased_fuzzer",
65    defaults: ["libicu_fuzzer_defaults"],
66    srcs: ["collator_rulebased_fuzzer.cpp"],
67    corpus: ["collator_rulebased_fuzzer_seed_corpus.txt"],
68}
69
70cc_fuzz {
71    name: "libicu_converter_fuzzer",
72    defaults: ["libicu_fuzzer_defaults"],
73    srcs: ["converter_fuzzer.cpp"],
74}
75
76cc_fuzz {
77    name: "libicu_locale_fuzzer",
78    defaults: ["libicu_fuzzer_defaults"],
79    srcs: ["locale_fuzzer.cpp"],
80}
81
82cc_fuzz {
83    name: "libicu_number_format_fuzzer",
84    defaults: ["libicu_fuzzer_defaults"],
85    srcs: ["number_format_fuzzer.cpp"],
86}
87
88cc_fuzz {
89    name: "libicu_ucasemap_fuzzer",
90    defaults: ["libicu_fuzzer_defaults"],
91    srcs: ["ucasemap_fuzzer.cpp"],
92}
93
94cc_fuzz {
95    name: "libicu_uloc_canonicalize_fuzzer",
96    defaults: ["libicu_fuzzer_defaults"],
97    srcs: ["uloc_canonicalize_fuzzer.cpp"],
98    corpus: ["uloc_canonicalize_fuzzer_seed_corpus.txt"],
99}
100
101cc_fuzz {
102    name: "libicu_uloc_for_language_tag_fuzzer",
103    defaults: ["libicu_fuzzer_defaults"],
104    srcs: ["uloc_for_language_tag_fuzzer.cpp"],
105    corpus: ["uloc_for_language_tag_fuzzer_seed_corpus.txt"],
106}
107
108cc_fuzz {
109    name: "libicu_uloc_get_name_fuzzer",
110    defaults: ["libicu_fuzzer_defaults"],
111    srcs: ["uloc_get_name_fuzzer.cpp"],
112    corpus: ["uloc_get_name_fuzzer_seed_corpus.txt"],
113}
114
115cc_fuzz {
116    name: "libicu_uloc_is_right_to_left_fuzzer",
117    defaults: ["libicu_fuzzer_defaults"],
118    srcs: ["uloc_is_right_to_left_fuzzer.cpp"],
119    corpus: ["uloc_is_right_to_left_fuzzer_seed_corpus.txt"],
120}
121
122cc_fuzz {
123    name: "libicu_uloc_open_keywords_fuzzer",
124    defaults: ["libicu_fuzzer_defaults"],
125    srcs: ["uloc_open_keywords_fuzzer.cpp"],
126    corpus: ["uloc_open_keywords_fuzzer_seed_corpus.txt"],
127}
128
129cc_fuzz {
130    name: "libicu_unicode_string_codepage_create_fuzzer",
131    defaults: ["libicu_fuzzer_defaults"],
132    srcs: ["unicode_string_codepage_create_fuzzer.cpp"],
133}
134
135cc_fuzz {
136    name: "libicu_uregex_open_fuzzer",
137    defaults: ["libicu_fuzzer_defaults"],
138    srcs: ["uregex_open_fuzzer.cpp"],
139    dictionary: "uregex_open_fuzzer.dict",
140}
141