[test spec] Write runtime deps to a canonical location.
host_tests.json may be used to find test specs printed to the root out
dir of //build/toolchain:host_${host_cpu}. Have write_runtime_deps write
to the same root out dir, so that these files may be discovered
alongside each other.
Change-Id: Ib460cd5a4aaf2018e0de61dd7b071fa7b2f21a21
diff --git a/test.gni b/test.gni
index ffd0f8c..ca9c385 100644
--- a/test.gni
+++ b/test.gni
@@ -20,8 +20,13 @@
forward_variables_from(invoker, "*")
testonly = true
if (is_linux || is_mac) {
+ # Write runtime dependencies to the root out dir of the base host
+ # toolchain so that the file may be found by cross-referencing with
+ # $root_build_dir/host_tests.json.
test_name = get_path_info(target_name, "name")
- write_runtime_deps = "$target_out_dir/$test_name.$test_data_ext"
+ host_out_dir = get_label_info(":$target_name(${toolchain_variant.base})",
+ "target_out_dir")
+ write_runtime_deps = "$host_out_dir/$test_name.$test_data_ext"
}
}
}