blob: 5655256a372fa1021d721f8ca2ce1761222013f8 [file] [log] [blame]
#!/bin/bash
### run e2e tests
## Usage: fx run-e2e-tests
##
## Thin wrapper around `fx run-host-tests` which sets up the environment to run
## an end to end test against the current hardware target.
##
## Hint:
## Use fx --dir and/or fx -d flags to change the selected build directory or
## target device.
set -o errexit
set -o pipefail
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/../lib/vars.sh
fx-config-read
export FUCHSIA_IPV4_ADDR=$(get-fuchsia-device-addr)
if [[ -z "$FUCHSIA_IPV4_ADDR" ]]; then
fx-error "Can not determine IP address of Fuchsia target"
exit 1
fi
export FUCHSIA_SSH_KEY="${FUCHSIA_DIR}/.ssh/pkey"
export FUCHSIA_TEST_OUTDIR="${FUCHSIA_OUT_DIR}/test_out/$(date +'%F-%H:%M:%S')"
mkdir -p "${FUCHSIA_TEST_OUTDIR}"
fx-command-run run-host-tests "$@"