1# Copyright (c) 2021-2023 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
14if (defined(ohos_lite)) {
15  import("//build/lite/config/component/lite_component.gni")
16  import("//build/lite/config/test.gni")
17  import("../../../../dsoftbus.gni")
18
19  dsoftbus_root_path = "../../../.."
20
21  if (ohos_build_type == "debug") {
22    unittest("SequenceVerificationTest") {
23      output_extension = "bin"
24      output_dir = "$root_out_dir/tests/unittest/dsoftbus"
25      sources = [ "unittest/sequence_verification_test.cpp" ]
26      include_dirs = [ "$dsoftbus_root_path/core/common/include" ]
27      ldflags = [
28        "-lstdc++",
29        "-Wl,-rpath-link=$ohos_root_path/$root_out_dir",
30      ]
31      deps = [ "$dsoftbus_root_path/core/common:softbus_utils" ]
32    }
33  }
34} else {
35  import("//build/test.gni")
36  import("../../../../dsoftbus.gni")
37
38  module_output_path = "dsoftbus/common"
39  ohos_unittest("SequenceVerificationTest") {
40    module_out_path = module_output_path
41    sources = [ "unittest/sequence_verification_test.cpp" ]
42
43    include_dirs = [ "$dsoftbus_root_path/core/common/include" ]
44
45    deps = [
46      "$dsoftbus_root_path/core/common:softbus_utils",
47      "$dsoftbus_root_path/core/frame:softbus_server",
48    ]
49    external_deps = [
50      "c_utils:utils",
51      "hilog:libhilog",
52    ]
53  }
54
55  group("unittest") {
56    testonly = true
57    deps = [ ":SequenceVerificationTest" ]
58  }
59}
60