blob: 8605b2d2557680bfee2e49185bcce79a1d56bea0 [file] [log] [blame] [edit]
#!/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 $@