blob: 5dd4e6113224c777557a6251de4418da3f5730c7 [file] [log] [blame]
#!/bin/bash
### run Google signin e2e tests
## Usage: run-signin-e2e --test-account-email <email>
## --test-account-password <pass>
##
## Runs the Google signin e2e test.
## WARNING: This should only be run using credentials for
## Owned Test Accounts!
source "$(cd "$(dirname "${BASH_SOURCE[0]}")"/../../../../ && pwd)"/tools/devshell/lib/vars.sh
fx-config-read
while (($#)); do
case "$1" in
--test-account-email)
export FUCHSIA_TEST_ACCOUNT_EMAIL=$2
shift
;;
--test-account-password)
export FUCHSIA_TEST_ACCOUNT_PASSWORD=$2
shift
;;
esac
shift
done
if [[ -z "$FUCHSIA_TEST_ACCOUNT_EMAIL" ]]; then
fx-error "No test account email provided"
exit 1
fi
if [[ -z "$FUCHSIA_TEST_ACCOUNT_PASSWORD" ]]; then
fx-error "No test account password provided"
exit 1
fi
export FUCHSIA_IPV4_ADDR=$(fx-command-run shell ifconfig eth | perl -n -e 'print $1 if /inet addr:(\S*)/')
if [[ -z "$FUCHSIA_IPV4_ADDR" ]]; then
fx-error "Can not determine IPV4 address of Fuchsia target"
exit 1
fi
export FUCHSIA_SSH_KEY="${FUCHSIA_DIR}/.ssh/pkey"
"${FUCHSIA_OUT_DIR}/default/google_signin_e2e_test"