# Copyright (C) 2022-2025 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build/ohos.gni")
import("//foundation/multimedia/player_framework/config.gni")

group("media_unit_test") {
  testonly = true
  deps = []
  if (player_framework_support_test) {
    deps += [
      "../frameworks/native/avmetadatahelper/test/unittest:avmetadata_unit_test",
      "../frameworks/native/player/test/unittest:player_unit_test",
      "../frameworks/native/recorder/test/unittest:recorder_unit_test",
      "../frameworks/native/recorder_profiles/test/unittest:recorder_profiles_unit_test",
      "../frameworks/native/system_sound_manager/unittest/ringtone_player_test:ringtone_player_unit_test",
      "../frameworks/native/system_sound_manager/unittest/sound_manager_test:system_sound_manager_unit_test",
      "../frameworks/native/system_sound_manager/unittest/tone_player_test:system_tone_player_unit_test",
      "../frameworks/native/system_sound_manager/unittest/sound_player_test:system_sound_player_unit_test",
      "../frameworks/native/transcoder/test/unittest:transcoder_unit_test",
      "../frameworks/native/video_editor/test/unittest:video_editor_unit_test",
      "unittest/audio_background_adapter_test:audio_background_adapter_unit_test",
      "unittest/audio_haptic_test:audio_haptic_player_impl_unit_test",
      "unittest/audio_haptic_test:audio_haptic_sound_low_latency_impl_unit_test",
      "unittest/audio_haptic_test:audio_haptic_sound_normal_impl_unit_test",
      "unittest/audio_haptic_test:audio_haptic_unit_test",
      "unittest/audio_haptic_test:audio_haptic_vibrator_impl_unit_test",
      "unittest/av_thumbnail_generator_unittest:av_thumbnail_generator_unittest",
      "unittest/avmetadata_helper_test:avmetadata_helper_unit_test",
      "unittest/avmetadata_helper_unittest:avmetadata_helper_unittest",
      "unittest/avmetadatahelper_impl_unit_test:avmetadatahelper_impl_unit_test",
      "unittest/avmetadatahelper_impl_unittest:avmetadatahelper_impl_unittest",
      "unittest/avmetadatahelper_test:avmetadatahelper_unit_test",
      "unittest/dfx_agent_test:dfx_agent_unit_test",
      "unittest/dfx_log_dump_unittest:dfx_log_dump_unittest",
      "unittest/dfx_test:player_framework_dfx_test",
      "unittest/downloaded_cache_loader_test/cache_manager_test:downloaded_cache_manager_test",
      "unittest/downloaded_cache_loader_test/cache_mapping_test:downloaded_cache_mapping_test",
      "unittest/downloaded_cache_loader_test/integration_test:downloaded_integration_test",
      "unittest/downloaded_cache_loader_test/path_validator_test:downloaded_path_validator_test",
      "unittest/downloaded_cache_loader_test/sha256_hasher_test:downloaded_sha256_hasher_test",
      "unittest/dragging_player_agent_unittest:dragging_player_agent_unittest",
      "unittest/hiplayer_impl_test:hiplayer_impl_unit_test",
      "unittest/hiplayer_impl_unittest:hiplayer_impl_unittest",
      "unittest/hitranscode:hitranscode_unit_test",
      "unittest/live_controller_unittest:live_controller_unittest",
      "unittest/hitranscode_impl_unittest:hitranscode_impl_unittest",
      "unittest/media_server_manager_test:media_server_manager_test",
      "unittest/media_server_manager_unittest:media_server_manager_unittest",
      "unittest/media_service_helper_test:media_service_helper_unit_test",
      "unittest/monitor_server_object_unittest:monitor_server_object_unittest",
      "unittest/monitor_server_test:monitor_server_test",
      "unittest/monitor_server_unittest:monitor_server_unittest",
      "unittest/native_avimagegenerate:native_avimagegenerator_unit_test",
      "unittest/native_avmediasource_unittest:native_avmediasource_unit_test",
      "unittest/native_avmetadataextractor:native_avmetadataextractor_unit_test",
      "unittest/native_avmetadatahelper_unittest:avmetadata_unittest",
      "unittest/native_avplayer_unittest:native_avplayer_unittest",
      "unittest/native_avtranscoder:native_avtranscoder_unit_test",
      "unittest/player_impl_unittest:player_impl_unittest",
      "unittest/player_mem_manage_test:player_mem_manage_test",
      "unittest/player_server_mem_test:player_server_mem_test",
      "unittest/player_server_mem_unittest:player_server_mem_unittest",
      "unittest/player_server_task_mgr_unittest:player_server_task_mgr_unittest",
      "unittest/player_server_test:player_server_unit_test",
      "unittest/player_server_unittest:player_server_unittest",
      "unittest/player_service_stub_test:player_service_stub_test",
      "unittest/player_xcollie_unittest:player_xcollie_unittest",
      "unittest/recorder_profiles_server_test:recorder_profiles_server_mock_unit_test",
      "unittest/recorder_profiles_server_test:recorder_profiles_server_unit_test",
      "unittest/recorder_profiles_unittest:recorder_profiles_xml_parser_unittest",
      "unittest/recorder_test:recorder_function_unit_test",
      "unittest/recorder_test:recorder_native_unit_test",
      "unittest/recorder_test:recorder_server_unit_test",
      "unittest/recorder_service_stub_test:recorder_service_stub_test",
      "unittest/sa_media_client_unit_test:sa_media_client_unit_test",
      "unittest/screen_capture_impl_unittest:screen_capture_impl_unittest",
      "unittest/service_dump_manager_unittest:service_dump_manager_unittest",
      "unittest/services/utils:utils_unit_test",
      "unittest/sound_parser_unittest:sound_parser_unittest",
      "unittest/soundpool_audiostream_unittest:soundpool_audiostream_unittest",
      "unittest/soundpool_cachebuffer_test:soundpool_cachebuffer_unit_test",
      "unittest/soundpool_cachebuffer_unittest:soundpool_cachebuffer_unittest",
      "unittest/soundpool_test:soundpool_unit_test",
      "unittest/soundpool_unittest:soundpool_unittest",
      "unittest/subscriber_unittest:account_subscriber_unittest",
      "unittest/task_queue_test:task_queue_unit_test",
      "unittest/timeout_test:player_timeout_unit_test",
      "unittest/transcoder_server:transcoder_server_unit_test",
      "unittest/utils_test:player_framework_utils_test",
      "example:audio_haptic_test",
      "unittest/cache_manager_test:cache_manager_test",
      "unittest/monitor_server_object_unittest:monitor_server_object_unittest",
      "unittest/avads_controller_napi_test:avads_controller_napi_test",
    ]
    if (player_framework_support_screen_capture) {
      deps += [
        "unittest/observer_test:account_observer_unit_test",
        "unittest/screen_capture_test:screen_capture_capi_unit_test",
        "unittest/screen_capture_test:screen_capture_native_unit_test",
        "unittest/screen_capture_test:screen_capture_server_function_unit_test",
        "unittest/screen_capture_test:screen_capture_ipc_unit_test",
      ]
      if (player_framework_support_screen_capture_stopbycall) {
        deps += [ "unittest/observer_test:incall_observer_unit_test" ]
      }
    }
    if (player_framework_support_lowpower_av_sink) {
      deps += [
        "unittest/lpp_unit_test/inner/lpp_audio_streamer_unit_test:lpp_audio_streamer_unit_test",
        "unittest/lpp_unit_test/inner/lpp_video_streamer_unit_test:lpp_video_streamer_unit_test",
        "unittest/lpp_unit_test/common/lpp_common_unit_test:lpp_common_unit_test",
        "unittest/lpp_unit_test/engine/lpp_video_callback_looper_unit_test:lpp_video_callback_looper_unit_test",
        "unittest/lpp_unit_test/engine/lpp_video_stream_unit_test:lpp_video_stream_unit_test",
        "unittest/lpp_unit_test/module/lpp_sync_mgr_adapter_unit_test:lpp_sync_mgr_adapter_unit_test",
        "unittest/lpp_unit_test/module/lpp_sync_mgr_unit_test:lpp_sync_mgr_unit_test",
        "unittest/lpp_unit_test/engine/lpp_astream_impl_unit_test:lpp_astream_impl_unit_test",
        "unittest/lpp_unit_test/engine/lpp_audio_callback_looper_unit_test:lpp_audio_callback_looper_unit_test",
        "unittest/lpp_unit_test/module/lpp_audio_data_mgr_unit_test:lpp_audio_data_mgr_unit_test",
        "unittest/lpp_unit_test/module/lpp_audio_render_adapter_unit_test:lpp_audio_render_adapter_unit_test",
        "unittest/lpp_unit_test/module/lpp_video_data_mgr_unit_test:lpp_video_data_mgr_unit_test",
        "unittest/lpp_unit_test/module/lpp_video_dec_adapter_unit_test:lpp_video_dec_adapter_unit_test",
        "unittest/lpp_unit_test/engine/lpp_engine_manager_unit_test:lpp_engine_manager_unit_test",
        "unittest/lpp_unit_test/engine/lpp_sync_manager_adapter_unit_test:lpp_sync_manager_adapter_unit_test",        
      ]
    }
  }
}

group("media_fuzz_test") {
  testonly = true
  deps = []
  if (player_framework_support_test) {
    deps += [ "fuzztest:fuzztest" ]
  }
}