1# Copyright (C) 2020-2021 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#     http://www.apache.org/licenses/LICENSE-2.0
6# Unless required by applicable law or agreed to in writing, software
7# distributed under the License is distributed on an "AS IS" BASIS,
8# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9# See the License for the specific language governing permissions and
10# limitations under the License.
11
12import("//build/lite/config/test.gni")
13import("//foundation/multimedia/media_utils_lite/config.gni")
14
15group("lite_medialite_test") {
16  if (ohos_build_type == "debug") {
17    deps = [
18      ":lite_player_unittest",
19      ":lite_recorder_unittest",
20    ]
21  }
22}
23
24if (ohos_build_type == "debug") {
25  unittest("lite_player_unittest") {
26    output_extension = "bin"
27    output_dir = "$root_out_dir/test/unittest/playerlite"
28    sources = [ "player_lite/player_lite_test.cpp" ]
29    cflags = [ "-Wno-error" ]
30    ldflags = [ "-lpthread" ]
31    ldflags += [ "-Wl,-rpath-link=$ohos_root_path/$root_out_dir" ]
32    include_dirs = [
33      "//third_party/bounds_checking_function/include",
34      "//foundation/arkui/ace_engine_lite/interfaces/inner_api/builtin/base",
35      "//foundation/arkui/ace_engine_lite/interfaces/inner_api/builtin/async",
36      "//foundation/multimedia/media_lite/interfaces/kits/player_lite",
37      "//foundation/multimedia/media_utils_lite/include",
38      "//foundation/multimedia/media_lite/test/unittest/player_lite",
39    ]
40
41    if (enable_media_passthrough_mode == true) {
42      defines = [ "ENABLE_PASSTHROUGH_MODE" ]
43    }
44
45    deps = [
46      "//foundation/multimedia/media_lite/frameworks/player_lite:player_lite",
47      "//foundation/multimedia/media_utils_lite:media_common",
48      "//third_party/bounds_checking_function:libsec_shared",
49    ]
50  }
51
52  unittest("lite_recorder_unittest") {
53    output_extension = "bin"
54    output_dir = "$root_out_dir/test/unittest/recorder"
55    sources = [ "recorder_lite/recorder_lite_test.cpp" ]
56    cflags = [ "-Wno-error" ]
57    include_dirs = [
58      "//third_party/bounds_checking_function/include",
59      "//drivers/peripheral/codec/interfaces/include",
60      "//foundation/multimedia/media_utils_lite/hals",
61      "//foundation/multimedia/media_lite/test/unittest/recorder_lite",
62      "//foundation/multimedia/media_lite/interfaces/kits/recorder_lite",
63      "//foundation/multimedia/media_lite/frameworks/recorder_lite",
64    ]
65
66    deps = [
67      "//foundation/multimedia/camera_lite/frameworks:camera_lite",
68      "//foundation/multimedia/media_lite/frameworks/recorder_lite:recorder_lite",
69    ]
70  }
71}
72