1# Copyright 2020 The Chromium Authors 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5assert(is_fuchsia) 6 7import("//build/util/generate_wrapper.gni") 8 9template("compute_fuchsia_package_sizes") { 10 generate_wrapper(target_name) { 11 forward_variables_from(invoker, 12 [ 13 "data", 14 "data_deps", 15 ]) 16 testonly = true 17 executable = "//build/fuchsia/binary_sizes.py" 18 wrapper_script = "$root_out_dir/bin/run_${target_name}" 19 20 assert(target_cpu == "arm64" || target_cpu == "x64", 21 "target_cpu must be arm64 or x64") 22 23 if (!defined(data)) { 24 data = [] 25 } 26 27 if (!defined(data_deps)) { 28 data_deps = [] 29 } 30 31 # Declares the files that are needed for test execution on the 32 # swarming test client. 33 # TODO(crbug.com/1347172): Remove arm64 once the execution of fuchsia_sizes 34 # has been migrated to x64 machines. 35 data += [ 36 "//build/fuchsia/", 37 "//tools/fuchsia/size_tests/", 38 "//third_party/fuchsia-sdk/sdk/arch/", 39 "//third_party/fuchsia-sdk/sdk/tools/arm64/", 40 "//third_party/fuchsia-sdk/sdk/tools/x64/", 41 ] 42 43 executable_args = [ 44 "--output-directory", 45 "@WrappedPath(.)", 46 ] 47 if (defined(invoker.executable_args)) { 48 executable_args += invoker.executable_args 49 } 50 } 51} 52