mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 08:56:40 +00:00
Meta: Properly handle GN unit tests which define their own deps
If a unit tests defines a `deps` array, the unit test template would have tried to overwrite it (and it is actually an error to overwrite a non-empty list with another non-empty list).
This commit is contained in:
parent
6a73e027a0
commit
b65c07082b
|
@ -8,7 +8,11 @@ template("unittest") {
|
|||
assert(!defined(invoker.output_dir), "cannot set unittest output_dir")
|
||||
assert(!defined(invoker.testonly), "cannot set unittest testonly")
|
||||
|
||||
deps = [ "//AK" ]
|
||||
if (!defined(invoker.deps)) {
|
||||
deps = []
|
||||
}
|
||||
|
||||
deps += [ "//AK" ]
|
||||
if (has_custom_main) {
|
||||
deps += [ "//Userland/Libraries/LibTest" ]
|
||||
} else if (use_js_main) {
|
||||
|
|
Loading…
Reference in a new issue