52 lines
1.5 KiB
Plaintext
52 lines
1.5 KiB
Plaintext
import("//testing/test.gni")
|
|
|
|
template("fix_testing_install_name_impl") {
|
|
action(target_name) {
|
|
forward_variables_from(invoker, "*")
|
|
testonly = true
|
|
script = "//build/gn_run_binary.py"
|
|
inputs = [
|
|
script,
|
|
"/usr/bin/install_name_tool",
|
|
executable_path,
|
|
]
|
|
|
|
args = [
|
|
"/usr/bin/install_name_tool",
|
|
] + command_args + [
|
|
rebase_path(executable_path, root_build_dir),
|
|
]
|
|
}
|
|
}
|
|
|
|
template("fix_testing_install_name") {
|
|
change_args = []
|
|
if (defined(invoker.changes)) {
|
|
foreach(change, invoker.changes) {
|
|
change_args += ["-change", change[0], change[1]]
|
|
}
|
|
}
|
|
|
|
if (defined(invoker.new_path) && defined(invoker.current_path)) {
|
|
change_args += ["-change", invoker.current_path, invoker.new_path]
|
|
}
|
|
|
|
fix_testing_install_name_impl(target_name + "_unit_tests") {
|
|
forward_variables_from(invoker, "*")
|
|
executable_path = "$root_build_dir/brave_unit_tests"
|
|
command_args = change_args
|
|
# input is the same as the output so just fake it
|
|
outputs = [ "$root_build_dir/alwaysrununittests/$target_name" ]
|
|
deps = [ "//brave/test:brave_unit_tests" ]
|
|
}
|
|
|
|
fix_testing_install_name_impl(target_name + "_browser_tests") {
|
|
forward_variables_from(invoker, "*")
|
|
executable_path = "$root_build_dir/brave_browser_tests"
|
|
command_args = change_args
|
|
# input is the same as the output so just fake it
|
|
outputs = [ "$root_build_dir/alwaysrunbrowsertests/$target_name" ]
|
|
deps = [ "//brave/test:brave_browser_tests" ]
|
|
}
|
|
}
|