Files

37 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

2025-02-12 09:54:05 -05:00
import("//build/userland/EXEC_TEMPLATE.gni")
template("xOS_test") {
app_name = string_replace(invoker.test_bundle, "/", "\$")
xOS_executable_template(app_name) {
install_path = "test_bin/"
forward_variables_from(invoker,
[
"sources",
"configs",
"deplibs",
"cflags",
"cflags_c",
"cflags_cc",
"cflags_objc",
"cflags_objcc",
"asmflags",
"ldflags",
"public_deps",
])
if (defined(invoker.cflags)) {
cflags = invoker.cflags
} else {
cflags = []
}
cflags += [
"-DTestMsg(x)=printf(\"[MSG] %s\n\", x);fflush(stdout);",
"-DTestErr(x)=printf(\"[MSG] %s\n\", x);fflush(stdout);exit(1)",
]
}
group(target_name) {
deps = [ ":$app_name" + "_build" ]
}
}