tests: only run source tarball test if running from git clone

This commit is contained in:
Hans-Christoph Steiner 2019-07-03 22:33:01 +02:00
parent 60173d35df
commit a9aa8788e0
1 changed files with 13 additions and 11 deletions

View File

@ -636,19 +636,21 @@ $fdroid install || true
#------------------------------------------------------------------------------#
echo_header "create a source tarball"
# only run this test if running from a git repo, not all files are in the tarball
if [ -e .git/config ]; then
echo_header "create a source tarball"
cd $WORKSPACE
./setup.py compile_catalog 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 --verbose
cd $WORKSPACE
./setup.py compile_catalog 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 --verbose
fi
#------------------------------------------------------------------------------#
echo_header "test config checks of local_copy_dir"