[Fuchsia] Generate <test_target_name> Wrapper in Output Directory
Allow fuchsia_test_runner template to create an executable wrapper with
same name as test target itself.
When building a test target, in addition to the test component
<test_target_name>_component, three wrapper scripts are created:
1. deploy_<test_target_name>, for deploying the Fuchsia package onto a
device
2. run_<test_target_name>, for running the Fuchsia package on the device
3. <test_target_name>, for running the Fuchsia package on the device
The first two executables will be found in ${OUTPUT_DIR}/bin whereas
%package% will be found directly in the output directory.
This change also allows ninja to identify which test target to build
in the case of duplicate target names (e.g. unit_tests) since ninja
prioritizes executable targets.
Bug: 1268956
Change-Id: I582ab0d22a1b19b0e8df1bb96e0c8d207b021a2c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3296401
Auto-Submit: Chong Gu <[email protected]>
Reviewed-by: David Dorwin <[email protected]>
Commit-Queue: Chong Gu <[email protected]>
Cr-Commit-Position: refs/heads/main@{#950169}
diff --git a/docs/fuchsia/build_instructions.md b/docs/fuchsia/build_instructions.md
index 36f9a7b1..e2974fec 100644
--- a/docs/fuchsia/build_instructions.md
+++ b/docs/fuchsia/build_instructions.md
@@ -268,13 +268,11 @@
* `default_fuchsia_build_dir_for_installation`. Point this to an output
directory in Fuchsia. For instance. `/path/to/src/fuchsia/out/qemu-x64`. This
- will automatically add the `--fuchsia-out-dir` flag to most `run_*` and
- `deploy_*` scripts.
+ will automatically add the `--fuchsia-out-dir` flag to wrapper scripts.
* `default_fuchsia_device_node_name`. Set this to a Fuchsia device node name.
- This will automatically add the `--node-name` flag to most `run_*` and
- `deploy_*` scripts.
-* Finally, use the `-d` flag to `run_*` scripts to execute them on an already
- running device or emulator, rather than starting an ephemeral emulator
- instance. This speeds up subsequent runs since the runner script does not need
- to wait for the emulator instance to boot and only differential changes are
- pushed to the device.
+ This will automatically add the `--node-name` flag to most wrapper scripts.
+* Finally, use the `-d` flag when running the <test_target_name> wrappers to
+ execute them on an already running device or emulator, rather than starting an
+ ephemeral emulator instance. This speeds up subsequent runs since the runner
+ script does not need to wait for the emulator instance to boot and only
+ differential changes are pushed to the device.