diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3460f092..2b337572 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -91,12 +91,16 @@ fedora_latest: - master@fdroid/fdroidserver script: - dnf -y update - - dnf -y install git gnupg java-1.8.0-openjdk-devel python3 python3-pip rsync unzip wget - - pip3 install -e . + - dnf -y install git gnupg java-1.8.0-openjdk-devel python3 python3-babel + python3-pip rsync unzip wget + - ./setup.py compile_catalog sdist + - useradd -m -c "test account" --password "fakepassword" testuser + - su testuser --login --command "cd `pwd`; pip3 install --user dist/fdroidserver-*.tar.gz" + - test -e ~testuser/.local/share/locale/de/LC_MESSAGES/fdroidserver.mo - wget --no-verbose -O tools.zip https://dl.google.com/android/repository/tools_r25.2.4-linux.zip - unzip -q tools.zip - rm tools.zip - - export ANDROID_HOME=~/android-sdk + - export ANDROID_HOME=`pwd`/android-sdk - mkdir $ANDROID_HOME - mv tools $ANDROID_HOME/ - mkdir -p $ANDROID_HOME/licenses/ @@ -107,5 +111,7 @@ fedora_latest: - touch ~/.android/repositories.cfg - echo y | $ANDROID_HOME/tools/bin/sdkmanager "platform-tools" - echo y | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;25.0.2" + - chown -R testuser . - cd tests - - ./run-tests + - su testuser --login --command + "cd `pwd`; export ANDROID_HOME=$ANDROID_HOME; fdroid=~testuser/.local/bin/fdroid ./run-tests" diff --git a/tests/complete-ci-tests b/tests/complete-ci-tests index 37e59489..4573fcd5 100755 --- a/tests/complete-ci-tests +++ b/tests/complete-ci-tests @@ -74,28 +74,6 @@ for locale in *; do done -#------------------------------------------------------------------------------# -# test building the source tarball, then installing it -cd $WORKSPACE -python3 setup.py compile_catalog sdist - -# make sure translation files got compiled and included -tar tzf dist/fdroidserver-*.tar.gz | grep locale/de/LC_MESSAGES/fdroidserver.mo - -rm -rf $WORKSPACE/env -$pyvenv $WORKSPACE/env -. $WORKSPACE/env/bin/activate -# workaround https://github.com/pypa/setuptools/issues/937 -pip3 install --quiet setuptools==33.1.1 -pip3 install --quiet dist/fdroidserver-*.tar.gz - -# make sure translation files were installed -test -e $WORKSPACE/env/share/locale/de/LC_MESSAGES/fdroidserver.mo - -# run tests in new pip+pyvenv install -fdroid=$WORKSPACE/env/bin/fdroid $WORKSPACE/tests/run-tests $apksource - - #------------------------------------------------------------------------------# # test install using install direct from git repo cd $WORKSPACE