[roll] Roll fuchsia [fx][incr] add package_label to tests.json

When a test is a component defined in a package, the 'label'
field of 'tests.json' currently represents the GN label of the
component, not the package. Although this is useful for matching
tests from a user perspective, it is not sufficient to build
the corresponding package.

This CL adds a new optional field 'package_label' to 'tests.json'
that contains a label to the package, while 'label' continues to be
a label to the component.

In addition, this CL also updates/fixes the following templates:

- fuchsia_test_package:
  - add 'package_label'

- fuzzer_package:
  - add 'package_label'
  - fix 'label', which was incorrectly set, to point to the fuzzer
  label.

An example of a `tests.json` entry for a fuzzer test defined in
//src/devices/sysmem/tests/sysmem/fuzz/BUILD.gn#18

```
BEFORE (notice the invalid label):
  {
    "test": {
      "label": "//src/devices/sysmem/tests/sysmem/fuzz/sysmem-fuzz:sysmem-fuzz(//build/toolchain/fuchsia:x64)",
      "name": "fuchsia-pkg://fuchsia.com/sysmem-fuzz#meta/sysmem_fuzzer_test.cmx",
      "package_url": "fuchsia-pkg://fuchsia.com/sysmem-fuzz#meta/sysmem_fuzzer_test.cmx"
     ...
    }
  },
  {
    "test": {
      "label": "//src/devices/sysmem/tests/sysmem/fuzz/sysmem-fuzz:sysmem-fuzz(//build/toolchain/fuchsia:x64)",
      "name": "fuchsia-pkg://fuchsia.com/sysmem-fuzz#meta/sysmem_fuzzer_multi_test.cmx",
      "package_url": "fuchsia-pkg://fuchsia.com/sysmem-fuzz#meta/sysmem_fuzzer_multi_test.cmx"
     ...
    }
  },

AFTER:
  {
    "test": {
      "label": "//src/devices/sysmem/tests/sysmem/fuzz:sysmem_fuzzer(//build/toolchain/fuchsia:x64)",
      "name": "fuchsia-pkg://fuchsia.com/sysmem-fuzz#meta/sysmem_fuzzer_test.cmx",
      "package_label": "//src/devices/sysmem/tests/sysmem/fuzz:sysmem-fuzz(//build/toolchain/fuchsia:x64)",
      "package_url": "fuchsia-pkg://fuchsia.com/sysmem-fuzz#meta/sysmem_fuzzer_test.cmx"
     ...
    }
  },
  {
    "test": {
      "label": "//src/devices/sysmem/tests/sysmem/fuzz:sysmem_fuzzer_multi(//build/toolchain/fuchsia:x64)",
      "name": "fuchsia-pkg://fuchsia.com/sysmem-fuzz#meta/sysmem_fuzzer_multi_test.cmx",
      "package_label": "//src/devices/sysmem/tests/sysmem/fuzz:sysmem-fuzz(//build/toolchain/fuchsia:x64)",
      "package_url": "fuchsia-pkg://fuchsia.com/sysmem-fuzz#meta/sysmem_fuzzer_multi_test.cmx"
     ...
    }
  },
```

Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/455157
Original-Revision: 14906b674222f5e8c8be472cdbbde952d41a65d7
GitOrigin-RevId: 642c2105f1bc2de70c0dbd0813153b3eba772b51
Change-Id: I829a1ac4aee87aaf48e58a7819fa0ad32e24e4c4
1 file changed
tree: a212d5c475b4edf06e9a31975578c705c7690ad4
  1. garnet/
  2. infra/
  3. peridot/
  4. third_party/
  5. topaz/
  6. zircon/
  7. flower
  8. jiri.lock
  9. minimal
  10. prebuilts
  11. README.md
  12. stem
  13. test_durations
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.