mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:57:35 +00:00
Meta: Add LibTest and Tests/AK to gn build
This commit is contained in:
parent
4bfb146181
commit
cbda1a6c73
5 changed files with 183 additions and 1 deletions
28
Meta/gn/secondary/Tests/unittest.gni
Normal file
28
Meta/gn/secondary/Tests/unittest.gni
Normal file
|
@ -0,0 +1,28 @@
|
|||
template("unittest") {
|
||||
executable(target_name) {
|
||||
has_custom_main = false
|
||||
use_js_main = false
|
||||
|
||||
# Foward everything (has_custom_main if set; configs, sources, deps, ...).
|
||||
forward_variables_from(invoker, "*")
|
||||
assert(!defined(invoker.output_dir), "cannot set unittest output_dir")
|
||||
assert(!defined(invoker.testonly), "cannot set unittest testonly")
|
||||
|
||||
output_dir = target_out_dir
|
||||
|
||||
deps = [ "//AK" ]
|
||||
if (has_custom_main) {
|
||||
deps += [ "//Userland/Libraries/LibTest" ]
|
||||
} else if (use_js_main) {
|
||||
deps += [ "//Userland/Libraries/LibTest:test_js_main" ]
|
||||
} else {
|
||||
deps += [ "//Userland/Libraries/LibTest:test_main" ]
|
||||
}
|
||||
|
||||
if (current_os != "serenity") {
|
||||
deps += [ "//Userland/Libraries/LibCore" ]
|
||||
}
|
||||
|
||||
testonly = true
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue