set -x
}
+# keep this as an old version to test the automatic parsing of build-tools
+# verion numbers in `fdroid init`
create_fake_android_home() {
+ mkdir $1/tools
+ mkdir $1/platform-tools
mkdir $1/build-tools
- mkdir $1/build-tools/19.1.0
- touch $1/build-tools/19.1.0/aapt
+ mkdir $1/build-tools/19.0.2
+ touch $1/build-tools/19.0.2/aapt
}
create_test_dir() {
aapt=`ls -1 $ANDROID_HOME/build-tools/*/aapt | sort | tail -1`
fi
+# allow the location of python to be overridden
+if [ -z $python ]; then
+ python=python2
+fi
+
+
+#------------------------------------------------------------------------------#
+echo_header "run commit hooks"
+
+cd $WORKSPACE
+./hooks/pre-commit
+
+
+#------------------------------------------------------------------------------#
+echo_header "create a source tarball and use that to build a repo"
+
+cd $WORKSPACE
+$python setup.py sdist
+
+REPOROOT=`create_test_dir`
+cd $REPOROOT
+tar xzf `ls -1 $WORKSPACE/dist/fdroidserver-*.tar.gz | sort -n | tail -1`
+cd $REPOROOT
+./fdroidserver-*/fdroid init
+copy_apks_into_repo $REPOROOT
+./fdroidserver-*/fdroid update --create-metadata
+
+
#------------------------------------------------------------------------------#
echo_header "test config checks of local_copy_dir"
#------------------------------------------------------------------------------#
-echo_header "check that fake android home passes `fdroid init`"
+echo_header "check that fake android home passes 'fdroid init'"
REPOROOT=`create_test_dir`
FAKE_ANDROID_HOME=`create_test_dir`
test -e opensc-fdroid.cfg
test ! -e NONE
+rm -rf $WORKSPACE/fdroidserver.egg-info/
echo SUCCESS