| #!/bin/bash |
| # Copyright 2024 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| #### CATEGORY=Build |
| ### add a GN label to args.gn and regen |
| |
| ## usage: fx add-host-test //foo/bar //foo/baz |
| ## |
| ## Adds the labels to `host_test_labels` and regen. |
| ## This is useful when `fx test` tells you to add a target to the build, |
| ## but you have some custom args set in `args.gn`, so do not want to run |
| ## `fx set` to overwrite those args. |
| |
| readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" |
| source "$SCRIPT_DIR/../lib/vars.sh" || exit $? |
| |
| fx-config-read |
| |
| set -e |
| |
| fx-command-exec add-test --target-list host_test_labels $@ |