bd049f5b53
Change-Id: I4fc94797f0c957dc5bb1d6bf94e7de8c1d2399b4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111501 Reviewed-by: Ben Konyi <bkonyi@google.com> Commit-Queue: Ben Konyi <bkonyi@google.com> Commit-Queue: Alexander Aprelev <aam@google.com>
43 lines
1.1 KiB
Plaintext
43 lines
1.1 KiB
Plaintext
# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
|
|
# for details. All rights reserved. Use of this source code is governed by a
|
|
# BSD-style license that can be found in the LICENSE file.
|
|
|
|
import("../../../build/executable_suffix.gni")
|
|
|
|
# This file defines a template for running bit tests.
|
|
#
|
|
# - bit_test()
|
|
# Runs bit on the specified file.
|
|
|
|
# A template for running bit. This lets bit commands be run as ninja commands.
|
|
#
|
|
# Parameters:
|
|
# tests:
|
|
# The list of files to input into bit
|
|
template("bit_test") {
|
|
assert(defined(invoker.tests), "tests must be defined for $target_name")
|
|
|
|
action_foreach(target_name) {
|
|
script = "../../../build/gn_run_binary.py"
|
|
sources = invoker.tests
|
|
|
|
deps = [
|
|
"../../bit",
|
|
]
|
|
inputs = [
|
|
"${root_out_dir}/bit$executable_suffix",
|
|
]
|
|
|
|
# This output is always dirty so ninja will always run this step when asked to.
|
|
outputs = [
|
|
"$target_gen_dir/{{source_name_part}}}",
|
|
]
|
|
args = [
|
|
"compiled_action",
|
|
rebase_path("${root_out_dir}/bit"),
|
|
"{{source}}",
|
|
rebase_path(target_gen_dir),
|
|
]
|
|
}
|
|
}
|