Squash commits for public release
This commit is contained in:
36
build/test/TEMPLATE.gni
Normal file
36
build/test/TEMPLATE.gni
Normal file
@@ -0,0 +1,36 @@
|
||||
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" ]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user