mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
[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:
parent
62fdcb0319
commit
acabf9d589
@ -16,8 +16,14 @@ void main() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
tearDownAll(() async {
|
tearDownAll(() async {
|
||||||
if (driver != null)
|
if (driver != null) {
|
||||||
driver.close();
|
driver.close();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Stock list is shown', () async {
|
||||||
|
final SerializableFinder stockList = find.byValueKey('stock-list');
|
||||||
|
expect(stockList, isNotNull);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('open AAPL stock', () async {
|
test('open AAPL stock', () async {
|
||||||
@ -30,10 +36,12 @@ void main() {
|
|||||||
await driver.tap(aaplStockRow);
|
await driver.tap(aaplStockRow);
|
||||||
await Future<void>.delayed(const Duration(milliseconds: 500));
|
await Future<void>.delayed(const Duration(milliseconds: 500));
|
||||||
|
|
||||||
final SerializableFinder stockOption = find.byValueKey('AAPL_symbol_name');
|
final SerializableFinder stockOption =
|
||||||
final String symbol = await driver.getText(stockOption, timeout: const Duration(milliseconds: 500));
|
find.byValueKey('AAPL_symbol_name');
|
||||||
|
final String symbol = await driver.getText(stockOption,
|
||||||
|
timeout: const Duration(milliseconds: 500));
|
||||||
|
|
||||||
expect(symbol, 'AAPL');
|
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
|
# This script expects `pm`, `device-finder`, and `fuchsia_ctl` to all be in the
|
||||||
# same directory as the script.
|
# 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
|
# The nodes are named blah-blah--four-word-fuchsia-id
|
||||||
device_name=${SWARMING_BOT_ID#*--}
|
device_name=${SWARMING_BOT_ID#*--}
|
||||||
@ -31,9 +33,49 @@ fi
|
|||||||
|
|
||||||
reboot() {
|
reboot() {
|
||||||
# note: this will set an exit code of 255, which we can ignore.
|
# 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
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user