blob: 5f9d6f31208e6b033582fe4c320f1251951dae49 [file] [log] [blame]
# Copyright 2020 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.
# A helper rule to write a file indicating that a target is a CTS target.
#
# This rule should not be called directly, but through cts_* other build rules.
template("write_cts_file") {
cts_extension = "this_is_cts"
name = string_replace(invoker.target_name, "_cts_file", "")
target_dir = rebase_path(get_label_info(":$name", "dir"), "//")
generated_file(target_name) {
outputs = [ "${root_build_dir}/cts/${target_dir}/${name}.${cts_extension}" ]
contents = true
}
}