# Copyright (c) 2021-2024 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/security/access_token/access_token.gni")
import("//build/ohos.gni")

group("accesstoken_build_module_test") {
  testonly = true
  deps = []
  if (is_standard_system) {
    deps += [
      "frameworks/json_adapter/test:unittest",
      "frameworks/test/unittest:unittest",
      "interfaces/inner_api/el5filekeymanager/test:unittest",
      "interfaces/innerkits/accesstoken/test:unittest",
      "interfaces/innerkits/analysis_model/test:unittest",
      "interfaces/innerkits/nativetoken/test:unittest",
      "interfaces/innerkits/privacy/test:unittest",
      "interfaces/innerkits/token_callback/test:unittest",
      "interfaces/innerkits/token_setproc/test:unittest",
      "services/accesstokenmanager/test:unittest",
      "services/common/database/test:unittest",
      "services/common/dfx/test:unittest",
      "services/common/json_parse/test:unittest",
      "tools/accesstoken/test:unittest",
    ]
    if (ability_base_enable == true) {
      deps += [
        "services/el5filekeymanager/test:unittest",
        "services/privacymanager/test:unittest",
      ]
    }
  }
  if (token_sync_enable == true) {
    deps += [
      "interfaces/innerkits/tokensync/test:unittest",
      "services/tokensyncmanager/test:unittest",
    ]
  }
}

group("accesstoken_build_fuzz_test") {
  testonly = true
  deps = []
  if (is_standard_system) {
    deps += [
      "test/fuzztest/innerkits/accesstoken:fuzztest",
      "test/fuzztest/innerkits/privacy:fuzztest",
      "test/fuzztest/normalize_service/accesstoken:fuzztest",
      "test/fuzztest/services/accesstoken:fuzztest",
      "test/fuzztest/services/privacy:fuzztest",
    ]
  }
}