Unverified Commit acabf9d5 authored by Kaushik Iska's avatar Kaushik Iska Committed by GitHub

[fuchsia] Runs stocks driver test on Fuchsia NUCs in devicelab

Also pushes tiles which is needed to host the flutter application on Fuchsia.
parent 62fdcb03
......@@ -16,8 +16,14 @@ void main() {
});
tearDownAll(() async {
if (driver != null)
if (driver != null) {
driver.close();
}
});
test('Stock list is shown', () async {
final SerializableFinder stockList = find.byValueKey('stock-list');
expect(stockList, isNotNull);
});
test('open AAPL stock', () async {
......@@ -30,10 +36,12 @@ void main() {
await driver.tap(aaplStockRow);
await Future<void>.delayed(const Duration(milliseconds: 500));
final SerializableFinder stockOption = find.byValueKey('AAPL_symbol_name');
final String symbol = await driver.getText(stockOption, timeout: const Duration(milliseconds: 500));
final SerializableFinder stockOption =
find.byValueKey('AAPL_symbol_name');
final String symbol = await driver.getText(stockOption,
timeout: const Duration(milliseconds: 500));
expect(symbol, 'AAPL');
});
}, skip: 'Needs to be fixed on Fuchsia.');
});
}
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment