chiark / gitweb /
tests: by default, run on included urzip.apk
authorHans-Christoph Steiner <hans@eds.org>
Fri, 27 Jun 2014 21:06:18 +0000 (17:06 -0400)
committerHans-Christoph Steiner <hans@eds.org>
Sat, 28 Jun 2014 00:31:28 +0000 (20:31 -0400)
This means you can just do `cd tests/ && ./run-tests` to run the tests now.
You can still override the APK source with the first argument, like:

cd tests/ && ./run-tests /path/to/lots/of/apks/dir

MANIFEST.in
tests/run-tests

index 93c086abba4cbf4017c34f83b8fa6ae0baae7a2a..29dd42e47f386c4153b8c658e2d29a11dd5ae0b8 100644 (file)
@@ -28,6 +28,7 @@ include fdroidserver/getsig/run.sh
 include fdroidserver/getsig/make.sh
 include fdroidserver/getsig/getsig.java
 include tests/run-tests
+include tests/urzip.apk
 include wp-fdroid/AndroidManifest.xml
 include wp-fdroid/android-permissions.php
 include wp-fdroid/readme.txt
index a55767654927a9f832e0fdb201120faa1555ace8..5bc1bd7be6f9100691716580fea39f6d626ad27c 100755 (executable)
@@ -42,7 +42,8 @@ create_test_file() {
 #------------------------------------------------------------------------------#
 # "main"
 
-if [ $# -ne 1 ]; then
+if [ $1 = "-h" ] || [ $1 = "--help" ]; then
+    set +x
     echo "Usage: $0 '/path/to/folder/with/apks'"
     exit 1
 fi
@@ -53,7 +54,11 @@ if [ -z $ANDROID_HOME ]; then
     exit 1
 fi
 
-APKDIR=$1
+if [ -z $1 ]; then
+    APKDIR=`pwd`
+else
+    APKDIR=$1
+fi
 
 if [ -z $WORKSPACE ]; then
     WORKSPACE=`dirname $(pwd)`