Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
flutter_wakelock
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
creativecreatorormaybenot
2019-07-07 16:51:47 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
39179a948263c461b60718487af439f5289a4e49
39179a94
1 parent
f15a0abe
CI
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
2 deletions
.travis.yml
CHANGELOG.md
README.md
ci/wait.sh
.travis.yml
View file @
39179a9
...
...
@@ -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
...
...
CHANGELOG.md
View file @
39179a9
...
...
@@ -3,6 +3,7 @@
*
Added integration testing.
*
Removed unnecessary Android Manifest permission.
*
Added a contributing guide.
*
Added CI.
## 0.1.2
...
...
README.md
View file @
39179a9
# Wakelock [](https://pub.dev/packages/wakelock)
# Wakelock [](https://pub.dev/packages/wakelock)
[](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.
...
...
ci/wait.sh
0 → 100644
View file @
39179a9
#!/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
...
...
Please
register
or
login
to post a comment