forked from f-droid/ci-images-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest
More file actions
executable file
·51 lines (36 loc) · 1.33 KB
/
test
File metadata and controls
executable file
·51 lines (36 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh
set -e
set -x
export TESTDIR=/builds/test
export GRADLE_USER_HOME=$TESTDIR/.gradle
mkdir -p $TESTDIR
cd $TESTDIR
fdroid nightly -h
fdroid init
git clone --depth 1 https://gitlab.com/fdroid/fdroidclient.git
cd fdroidclient
./tools/check-format-strings.py
cat /proc/meminfo
maxmem=$(expr $(sed -n 's,^MemAvailable:[^0-9]*\([0-9][0-9]*\)[^0-9]*$,\1,p' /proc/meminfo) / 1024 / 2 / 1024 \* 1024)
printf "\norg.gradle.jvmargs=-Xmx${maxmem}m -XX:MaxPermSize=${maxmem}m\norg.gradle.daemon=false\norg.gradle.parallel=false\n" >> local.properties
# fork after every test to try to avoid crashes
sed -i 's,forkEvery.*,forkEvery = 1,' app/build.gradle
./gradlew testFullDebugUnitTest
test -z "$DEBUG_KEYSTORE" || fdroid nightly -v
emulator -accel-check || true
grep -v '^License' $ANDROID_HOME/tools/source.properties \
$ANDROID_HOME/emulator/source.properties \
avdmanager list avd
adb start-server
export CI_JOB_NAME="test 23 default x86_64"
start-emulator
wait-for-emulator
export FLAG=-Pandroid.testInstrumentationRunnerArguments.notAnnotation=androidx.test.filters.LargeTest
./gradlew connectedFullDebugAndroidTest $FLAG \
|| (adb -e logcat -d '*:W'; exit 1)
du -sh --one-file-system /* || true
du -sh --one-file-system /var/* || true
du -sh --one-file-system $ANDROID_HOME/* || true
apt-get -qy update
apt-get -qy install procps
ps auxww