| # Copyright 2021 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//sdk/ctf/build/compatibility_test_suite.gni") |
| import("//sdk/ctf/build/ctf.gni") |
| import("//sdk/ctf/build/internal/ctf_releases.gni") |
| import("//sdk/ctf/build/internal/platform_version.gni") |
| |
| # Store accumulated test targets. |
| all_test_targets = [] |
| |
| # Expand each CTF release into a compatibility_test_suite target. |
| # Each release name is assumed to match the pattern /f[0-9]+/, where |
| # the number denotes the release version. |
| foreach(release, ctf_releases) { |
| target_name = "ctf_$release" |
| level = string_replace("##${release}", "##f", "") |
| assert(level != "##${release}", |
| "Unexpected release name (does not begin with 'f'): ${release}") |
| compatibility_test_suite(target_name) { |
| api_level = level |
| path = "//prebuilt/ctf/$release/$host_platform/cts" |
| } |
| all_test_targets += [ ":$target_name" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = all_test_targets |
| } |