# Copyright (c) 2021-2022 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("//base/startup/appspawn/appspawn.gni")
import("//build/test.gni")

group("moduletest") {
  if (!defined(ohos_lite)) {
    testonly = true
    deps = [ "moduletest:moduletest" ]
  }
}

group("unittest") {
  if (!defined(ohos_lite)) {
    testonly = true
    deps = [ "unittest/app_spawn_client_test:AppSpawn_client_ut" ]
    if (!use_libfuzzer) {
      deps += [ "unittest/app_spawn_standard_test/app_spawn_cgroup_test:AppSpawn_CGroup_Test" ]
      deps += [ "unittest/app_spawn_standard_test:AppSpawn_ut" ]
      deps += [ "unittest/app_spawn_standard_test/app_spawn_sandbox_normal_test:AppSpawn_Sandbox_Normal_Test" ]
      deps += [ "unittest/app_spawn_standard_test:AppSpawn_common_ut" ]
      deps += [ "unittest/app_spawn_standard_test:appspawn_standard_tests" ]
      deps += [ "unittest/app_spawn_standard_test/spawning_fd_manager_test:AppSpawn_SpawningFd_Test" ]
      deps += [ "unittest/app_spawn_standard_test/spawning_fd_manager_test:AppSpawn_SpawningFd_Service_Test" ]
      deps += [ "unittest/app_spawn_standard_test/spawning_fd_manager_test:AppSpawn_SpawningFd_Mock_Test" ]
      deps += [ "unittest/app_spawn_standard_test/app_spawn_checkpoint_test:AppSpawn_CheckPoint_Test" ]
      deps += [ "unittest/app_spawn_standard_test/app_spawn_unlock_mount_test:AppSpawn_Unlock_Mount_Hisysevent_Test" ]
      deps += [ "unittest/app_spawn_standard_test/app_spawn_unlock_mount_test:AppSpawn_Unlock_Mount_Sandbox_Test" ]
      deps += [ "unittest/app_spawn_standard_test/app_spawn_unlock_mount_test:AppSpawn_Unlock_Mount_Service_Test" ]
    }
    deps += [ "unittest/hnp_test:HnpTest" ]
    deps += [ "unittest/hnp_test/private_hnp_test:HnpPrivateTest" ]
    deps += [ "unittest/hnp_test/hnp_rebuild_test:HnpRebuildCfgTest" ]
    deps += [ "unittest/single_test/hnp_installer:hnp_installer_test" ]
    deps += [ "unittest/single_test/appspawn_service:appspawn_service_single_test" ]
    deps += [ "unittest/devicedebug_test:DevicedebugTest" ]
    deps += [ "unittest/app_spawn_hisysevent_test:AppSpawn_HisysEvent_ut" ]
    deps += [ "unittest/dec_util_test:DecUtilTest" ]
    deps += [ "unittest/sandbox_dec_test:SandboxDecTest" ]
    deps += [ "unittest/app_spawn_exit_lock_test:AppspawnExitLockTest" ]
    deps += [ "unittest/dec_api_test:DecApiTest" ]
  } else {
    testonly = true
    deps = [ "unittest/app_spawn_lite_test:unittest" ]
  }
}

group("fuzztest") {
  if (!defined(ohos_lite)) {
    testonly = true
    deps = [ "fuzztest:app_spawn_fuzztest" ]
  }
}