Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
9
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
F-Droid
Client
Commits
080f93eb
Commit
080f93eb
authored
Apr 25, 2019
by
Hans-Christoph Steiner
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-emulator-tests' into 'master'
Fix emulator tests See merge request
!816
parents
85494136
306786c9
Pipeline
#58482722
failed with stages
in 40 minutes and 34 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
7 deletions
+22
-7
.gitlab-ci.yml
.gitlab-ci.yml
+18
-7
.weblate
.weblate
+3
-0
app/src/androidTest/java/org/fdroid/fdroid/MainActivityEspressoTest.java
...Test/java/org/fdroid/fdroid/MainActivityEspressoTest.java
+1
-0
No files found.
.gitlab-ci.yml
View file @
080f93eb
...
...
@@ -67,10 +67,17 @@ errorprone:
-
echo $AVD_PACKAGE
-
emulator -accel-check ||
true
# Use bleeding edge for Q, or download proven emulator version, based on
# https://aur.archlinux.org/android-emulator.git
-
if [[ "$AVD_SDK" == Q ]]; then
set -x; echo y | sdkmanager --channel=3 "emulator" > /dev/null; set +x;
-
elif [[ "$AVD_ARCH" != arm* ]]; then
set -x; echo y | sdkmanager "emulator" > /dev/null; set +x;
else
set -x;
rm -rf $ANDROID_HOME/emulator;
wget -q http://dl.google.com/android/repository/emulator-linux-5264690.zip;
echo "48c1cda2bdf3095d9d9d5c010fbfb3d6d673e3ea emulator-linux-5264690.zip" | sha1sum -c;
unzip -qq -d $ANDROID_HOME emulator-linux-5264690.zip;
set +x;
fi
-
grep Revision $ANDROID_HOME/emulator/source.properties
...
...
@@ -81,14 +88,15 @@ errorprone:
rm -rf ~/.android/avd $ANDROID_HOME/system-images;
echo y | sdkmanager "$AVD_PACKAGE" > /dev/null;
echo no | avdmanager create avd --name avd$AVD_SDK --tag "$AVD_TAG" --package "$AVD_PACKAGE" --sdcard 64M --device "Nexus 5";
export RAMSIZE="
$((
`sed -n 's,^MemAvailable:[^0-9]*\([0-9][0-9]*\)[^0-9]*$,\1,p' /proc/meminfo`
* 3 / 4 / 1024))
";
if [ $RAMSIZE -l
t 4096
]; then
export RAMSIZE="`sed -n 's,^MemAvailable:[^0-9]*\([0-9][0-9]*\)[^0-9]*$,\1,p' /proc/meminfo`";
if [ $RAMSIZE -l
e 2048
]; then
sed -i '/^hw\.ramSize\s*=.*/d' ~/.android/avd/*.avd/config.ini;
echo "hw.ramSize=
$RAMSIZE
" >> ~/.android/avd/*.avd/config.ini;
echo "hw.ramSize=
1024
" >> ~/.android/avd/*.avd/config.ini;
fi;
avdmanager list avd;
set +x;
fi
-
grep -v '^License' $ANDROID_HOME/system-images/android-$AVD_SDK/$AVD_TAG/$AVD_ARCH/source.properties
-
adb start-server
-
ls -l ~/.android
-
emulator -version
...
...
@@ -105,8 +113,11 @@ errorprone:
-
wait-for-emulator
-
adb devices
-
adb shell input keyevent 82 &
-
test $AVD_SDK -ge 25 || export FLAG=-Pandroid.testInstrumentationRunnerArguments.notAnnotation=android.test.suitebuilder.annotation.LargeTest
-
./gradlew connectedFullDebugAndroidTest $FLAG || (adb -e logcat -d > logcat.txt; exit 1)
-
test $AVD_SDK -ge 25 || export FLAG=-Pandroid.testInstrumentationRunnerArguments.notAnnotation=android.support.test.filters.LargeTest
-
./gradlew connectedFullDebugAndroidTest $FLAG
|| ./gradlew connectedFullDebugAndroidTest $FLAG
|| ./gradlew connectedFullDebugAndroidTest $FLAG
|| (adb -e logcat -d > logcat.txt; exit 1)
connected 22 default armeabi-v7a
:
retry
:
1
...
...
.weblate
0 → 100644
View file @
080f93eb
[weblate]
url = https://hosted.weblate.org/api/
translation = f-droid/f-droid
app/src/androidTest/java/org/fdroid/fdroid/MainActivityEspressoTest.java
View file @
080f93eb
...
...
@@ -49,6 +49,7 @@ import static org.hamcrest.Matchers.not;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
static
org
.
junit
.
Assume
.
assumeTrue
;
@LargeTest
@RunWith
(
AndroidJUnit4
.
class
)
public
class
MainActivityEspressoTest
{
public
static
final
String
TAG
=
"MainActivityEspressoTest"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment