|  | #!/bin/bash | 
|  | # Copyright 2018 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=Run, inspect and debug | 
|  | #### DEPRECATED | 
|  | ### build a test package and run on target. | 
|  |  | 
|  | ## This command is being deprecated in favor of `fx test`. Read more at: | 
|  | ##   https://fuchsia.dev/fuchsia-src/development/testing/running_tests_as_components#converting_from_run-test_or_run-host-tests | 
|  | ## | 
|  | ## usage: fx run-test-component [-t|--test <test_name>] [-d|--device <device>] PKG_TARGET | 
|  | ## Builds the specified test package (e.g., appmgr_integration_tests), copies it to the | 
|  | ## target, and executes it. | 
|  | ## | 
|  | ## PKG_TARGET is fully qualified or under fuchsia-pkg://fuchsia.com/ | 
|  | ## | 
|  | ## If using this command, please run 'fx build' again before paving your device | 
|  | ## because 'fx build updates' used by this script does not build images so it | 
|  | ## can leave paver in weird state. | 
|  | ## Arguments: | 
|  | ##   -t|--test    Test to run. If not specified, it will run all tests in PKG_TARGET. | 
|  | ##   -d|--device  Target device. | 
|  |  | 
|  | set -e | 
|  |  | 
|  | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/lib/vars.sh || exit $? | 
|  | fx-config-read | 
|  |  | 
|  | function usage { | 
|  | fx-command-help run-test-component | 
|  | } | 
|  |  | 
|  | fx-command-run run-test "$@" |