# Copyright (C) 2019 The Android Open Source Project
#
# 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("perfetto.gni")

perfetto_integrationtests_targets = [
  "gn:default_deps",
  "src/tracing/test:client_api_integrationtests",
]

if (enable_perfetto_ipc && enable_perfetto_system_consumer) {
  perfetto_integrationtests_targets +=
      [
        "src/tracing/test:tracing_integration_test",
        "src/tracing:integrationtests",
      ]
}

if (enable_perfetto_traced_probes) {
  # enable_perfetto_traced_probes implies enable_perfetto_platform_services.
  perfetto_integrationtests_targets += [
    "src/traced/probes/ftrace:integrationtests",
    "test:integrationtests",
  ]
}

if (enable_perfetto_heapprofd) {
  perfetto_integrationtests_targets +=
      [ "src/profiling/memory:end_to_end_tests" ]
}

# This test requires extra data files that are not easily available in Android
# builds.
# TODO(lalitm): looks like they don't work on standalone Android either because
# run_android_test doesn't push the test data.
if (enable_perfetto_trace_processor && perfetto_build_standalone &&
    !is_android) {
  perfetto_integrationtests_targets +=
      [ "src/trace_processor:integrationtests" ]
}
