Remove necessity to prepare tests via shell script

This commit is contained in:
Dominik Schürmann 2014-12-28 21:48:49 +01:00
parent d8e6e51452
commit 56325851dc
3 changed files with 3 additions and 35 deletions

View File

@ -12,7 +12,6 @@ before_install:
# Install required Android components. # Install required Android components.
#- echo "y" | android update sdk -a --filter build-tools-19.1.0,android-19,platform-tools,extra-android-support,extra-android-m2repository --no-ui --force #- echo "y" | android update sdk -a --filter build-tools-19.1.0,android-19,platform-tools,extra-android-support,extra-android-m2repository --no-ui --force
- ( sleep 5 && while [ 1 ]; do sleep 1; echo y; done ) | android update sdk --no-ui --all --force --filter build-tools-21.1.1,build-tools-19.1.0,android-21,android-19,platform-tools,extra-android-support,extra-android-m2repository - ( sleep 5 && while [ 1 ]; do sleep 1; echo y; done ) | android update sdk --no-ui --all --force --filter build-tools-21.1.1,build-tools-19.1.0,android-21,android-19,platform-tools,extra-android-support,extra-android-m2repository
- ./prepare-tests.sh
install: echo "Installation done" install: echo "Installation done"
script: script:
- ./gradlew assemble -S -q - ./gradlew assemble -S -q

View File

@ -33,17 +33,16 @@ Development mailinglist at http://groups.google.com/d/forum/openpgp-keychain-dev
1. Get all external submodules with ``git submodule update --init --recursive`` 1. Get all external submodules with ``git submodule update --init --recursive``
2. Have Android SDK "tools", "platform-tools", and "build-tools" directories in your PATH (http://developer.android.com/sdk/index.html) 2. Have Android SDK "tools", "platform-tools", and "build-tools" directories in your PATH (http://developer.android.com/sdk/index.html)
3. Open the Android SDK Manager (shell command: ``android``). 3. Open the Android SDK Manager (shell command: ``android``).
Expand the Tools directory and select "Android SDK Build-tools (Version 19.1)". Expand the Tools directory and select "Android SDK Build-tools (Version 21.1.1)".
Expand the Extras directory and install "Android Support Repository" Expand the Extras directory and install "Android Support Repository"
Select everything for the newest SDK Platform (API-Level 19) Select everything for the newest SDK Platform (API-Level 21)
4. Export ANDROID_HOME pointing to your Android SDK 4. Export ANDROID_HOME pointing to your Android SDK
5. Execute ``./gradlew build`` 5. Execute ``./gradlew build``
6. You can install the app with ``adb install -r OpenKeychain/build/outputs/apk/OpenKeychain-debug-unaligned.apk`` 6. You can install the app with ``adb install -r OpenKeychain/build/outputs/apk/OpenKeychain-debug-unaligned.apk``
### Run Tests ### Run Tests
1. Use OpenJDK instead of Oracle JDK 1. Use OpenJDK instead of Oracle JDK
2. Execute ``./prepare-tests.sh`` 3. Execute ``./gradlew test``
3. Execute ``./gradlew build``
### Build API Demo with Gradle ### Build API Demo with Gradle

View File

@ -1,30 +0,0 @@
#!/bin/bash
# This script installs a plugin which is necessary to run OpenKeychain's tests
# into the local maven repository, then puts a line to include the -Test
# subproject into settings.gradle
echo "checking jdk runtime.."
if ! java -version 2>&1 | grep OpenJDK; then
echo "tests will only run on openjdk, see readme for details!" >&2
return
fi
#tmpdir="$(mktemp -d)"
#(
# cd "$tmpdir";
# git clone https://github.com/nenick/gradle-android-test-plugin.git
# cd gradle-android-test-plugin
# echo "rootProject.name = 'gradle-android-test-plugin-parent'" > settings.gradle
# echo "include ':gradle-android-test-plugin'" >> settings.gradle
# ./gradlew :gradle-android-test-plugin:install
#)
#rm -rf "$tmpdir"
echo -n "ok, adding tests to include list.. "
if grep OpenKeychain-Test settings.gradle >/dev/null ; then
echo " already in."
else
echo "include ':OpenKeychain-Test'" >> settings.gradle
echo "ok"
fi