[fuchsia] Runs stocks driver test on Fuchsia NUCs in devicelab
Also pushes tiles which is needed to host the flutter application on Fuchsia.
This commit is contained in:
@@ -16,7 +16,9 @@
|
||||
# This script expects `pm`, `device-finder`, and `fuchsia_ctl` to all be in the
|
||||
# same directory as the script.
|
||||
|
||||
set -Ee
|
||||
set -Eex
|
||||
|
||||
script_dir=$(dirname "$(readlink -f "$0")")
|
||||
|
||||
# The nodes are named blah-blah--four-word-fuchsia-id
|
||||
device_name=${SWARMING_BOT_ID#*--}
|
||||
@@ -31,9 +33,49 @@ fi
|
||||
|
||||
reboot() {
|
||||
# note: this will set an exit code of 255, which we can ignore.
|
||||
./fuchsia_ctl -d $device_name ssh -c "dm reboot-recovery" || true
|
||||
$script_dir/fuchsia_ctl -d $device_name --dev-finder-path $script_dir/dev_finder ssh --identity-file $script_dir/.ssh/pkey -c "dm reboot-recovery" || true
|
||||
}
|
||||
|
||||
trap reboot EXIT
|
||||
|
||||
./fuchsia_ctl -d $device_name pave -i $1
|
||||
$script_dir/fuchsia_ctl -d $device_name pave -i $1
|
||||
$script_dir/fuchsia_ctl push-packages -d $device_name --repoArchive generic-x64.tar.gz -p tiles -p tiles_ctl
|
||||
|
||||
# set fuchsia ssh config
|
||||
export FUCHSIA_SSH_PKEY=$script_dir/.ssh/pkey
|
||||
cat > $script_dir/fuchsia_ssh_config << EOF
|
||||
Host *
|
||||
CheckHostIP no
|
||||
StrictHostKeyChecking no
|
||||
ForwardAgent no
|
||||
ForwardX11 no
|
||||
GSSAPIDelegateCredentials no
|
||||
UserKnownHostsFile /dev/null
|
||||
User fuchsia
|
||||
IdentitiesOnly yes
|
||||
IdentityFile $FUCHSIA_SSH_PKEY
|
||||
ControlPersist yes
|
||||
ControlMaster auto
|
||||
ControlPath /tmp/fuchsia--%r@%h:%p
|
||||
ConnectTimeout 10
|
||||
ServerAliveInterval 1
|
||||
ServerAliveCountMax 10
|
||||
LogLevel ERROR
|
||||
EOF
|
||||
|
||||
export FUCHSIA_SSH_CONFIG=$script_dir/fuchsia_ssh_config
|
||||
|
||||
# Run the driver test
|
||||
flutter_dir=$script_dir/flutter
|
||||
flutter_bin=$flutter_dir/bin/flutter
|
||||
|
||||
# remove all out dated .packages references
|
||||
find $flutter_dir -name ".packages" | xargs rm
|
||||
|
||||
cd $flutter_dir/dev/benchmarks/test_apps/stocks/
|
||||
|
||||
$flutter_bin precache --fuchsia
|
||||
$flutter_bin precache --flutter_runner
|
||||
|
||||
$flutter_bin pub get
|
||||
$flutter_bin drive -v --target=test_driver/stock_view.dart
|
||||
|
||||
Reference in New Issue
Block a user