creativecreatorormaybenot

CI

... ... @@ -47,9 +47,12 @@ jobs:
- flutter doctor -v
# Wait for emulator to finish startup.
- ./script/android-wait-for-emulator.sh
- ./ci/wait.sh
- adb shell input keyevent 82
- flutter devices
# cd to example
- cd example
script: travis_retry flutter driver test_driver/app.dart
- <<: *integration-test-stage
os: osx
... ... @@ -72,4 +75,7 @@ jobs:
- export PATH="$PATH":"$HOME/.pub-cache/bin"
- export PATH=$PWD/flutter/bin:$PWD/flutter/bin/cache/dart-sdk/bin:$PATH
- flutter doctor -v
# cd to example
- cd example
script: travis_retry flutter driver test_driver/main.dart
\ No newline at end of file
... ...
... ... @@ -3,6 +3,7 @@
* Added integration testing.
* Removed unnecessary Android Manifest permission.
* Added a contributing guide.
* Added CI.
## 0.1.2
... ...
# Wakelock [![](https://img.shields.io/pub/v/wakelock.svg)](https://pub.dev/packages/wakelock)
# Wakelock [![](https://img.shields.io/pub/v/wakelock.svg)](https://pub.dev/packages/wakelock) [![](https://travis-ci.com/creativecreatorormaybenot/wakelock.svg?branch=master)](https://travis-ci.com/creativecreatorormaybenot/wakelock)
This plugin allows you to enable and toggle the Android and iOS screen wakelock, which prevents the screen from turning off automatically.
Essentially, this allows you to keep the device awake, i.e. prevent the phone or tablet from sleeping.
... ...
#!/bin/bash
# Based on https://medium.com/@nocnoc/flutter-unit-widget-and-integration-testing-with-ios-and-android-emulators-on-travis-ci-df17ed7c3be
# Originally written by Ralf Kistner <ralf@embarkmobile.com>, but placed in the public domain
set +e
bootanim=""
failcounter=0
timeout_in_sec=360
until [[ "$bootanim" =~ "stopped" ]]; do
bootanim=`adb -e shell getprop init.svc.bootanim 2>&1 &`
if [[ "$bootanim" =~ "device not found" || "$bootanim" =~ "device offline"
|| "$bootanim" =~ "running" ]]; then
let "failcounter += 1"
echo "Waiting for emulator to start"
if [[ $failcounter -gt timeout_in_sec ]]; then
echo "Timeout ($timeout_in_sec seconds) reached; failed to start emulator"
exit 1
fi
fi
sleep 1
done
echo "Emulator is ready"
\ No newline at end of file
... ...