[fuchsia][v8_unittests] move to Fuchsia SDK package templates

Use the `fuchsia_component` and `fuchsia_package` GN templates from the
Fuchsia SDK to package the `v8_unittests` test for Fuchsia. Give the
`v8_unittests` their own dedicated `.cmx` file, instead of depending on
`v8.cmx`.

Bug: chromium:1256503
Change-Id: I22788359bed18eb643e288ee1a0c92c24c0dc3e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3819644
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Commit-Queue: Derek Gonyeo <dgonyeo@google.com>
Cr-Commit-Position: refs/heads/main@{#82656}
This commit is contained in:
Derek Gonyeo 2022-08-09 15:11:33 +02:00 committed by V8 LUCI CQ
parent 772d2ba188
commit 086f0be523
2 changed files with 33 additions and 4 deletions

View File

@ -7,11 +7,16 @@ import("../../gni/v8.gni")
if (is_fuchsia) {
import("//build/config/fuchsia/rules.gni")
cr_fuchsia_package("v8_unittests_pkg") {
fuchsia_component("v8_unittests_component") {
testonly = true
binary = ":unittests"
manifest = "../../gni/v8.cmx"
package_name_override = "v8_unittests"
data_deps = [ ":unittests" ]
manifest = "v8_unittests.cmx"
}
fuchsia_package("v8_unittests_pkg") {
testonly = true
package_name = "v8_unittests"
deps = [ ":v8_unittests_component" ]
}
fuchsia_test_runner("v8_unittests_fuchsia") {

View File

@ -0,0 +1,24 @@
{
"program": {
"binary": "unittests"
},
"facets": {
"fuchsia.test": {
"system-services": [
"fuchsia.kernel.VmexResource"
]
}
},
"sandbox": {
"features": [
"deprecated-ambient-replace-as-executable",
"isolated-persistent-storage",
"isolated-temp"
],
"services": [
"fuchsia.kernel.VmexResource",
"fuchsia.logger.LogSink",
"fuchsia.process.Launcher"
]
}
}