1# Copyright (c) 2022-2024 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/test.gni")
15import("../../../dsoftbus.gni")
16
17dsoftbus_root_path = "../../.."
18
19native_source_path = rebase_path("$dsoftbus_root_path")
20dep_dir = "dsoftbus_enhance/test/sdk/transmission"
21trans_enhance_test = exec_script("$dsoftbus_root_path/check_sub_module.py",
22                                 [
23                                   "$native_source_path",
24                                   "$dep_dir",
25                                 ],
26                                 "value")
27
28trans_enhance_fuzz_dir = "dsoftbus_enhance/test/sdk/transmission/fuzztest"
29trans_enhance_fuzz_test = exec_script("$dsoftbus_root_path/check_sub_module.py",
30                                      [
31                                        "$native_source_path",
32                                        "$trans_enhance_fuzz_dir",
33                                      ],
34                                      "value")
35
36trans_enhance_mt_dir = "dsoftbus_enhance/test/sdk/transmission/moduletest"
37trans_enhance_mt_test = exec_script("$dsoftbus_root_path/check_sub_module.py",
38                                    [
39                                      "$native_source_path",
40                                      "$trans_enhance_mt_dir",
41                                    ],
42                                    "value")
43
44group("benchmarktest") {
45  testonly = true
46  deps = [ "benchmarktest:benchmarktest" ]
47}
48
49group("fuzztest") {
50  testonly = true
51  deps = [ "fuzztest:fuzztest" ]
52  if (trans_enhance_fuzz_test) {
53    deps += [ "$dsoftbus_root_path/dsoftbus_enhance/test/sdk/transmission/fuzztest:fuzztest" ]
54  }
55}
56
57group("integration_test") {
58  testonly = true
59  deps = [ "integration_test:integration_test" ]
60}
61
62group("moduletest") {
63  testonly = true
64  deps = [ "moduletest:moduletest" ]
65  if (trans_enhance_mt_test) {
66    deps += [ "$dsoftbus_root_path/dsoftbus_enhance/test/sdk/transmission/moduletest:moduletest" ]
67  }
68}
69
70group("unittest") {
71  testonly = true
72  deps = [
73    "ipc:unittest",
74    "session:unittest",
75    "trans_channel:unittest",
76  ]
77  if (trans_enhance_test) {
78    deps += [
79      "$dsoftbus_root_path/dsoftbus_enhance/test/sdk/transmission:unittest",
80    ]
81  }
82}
83