From 67e65ce2ea9e6831162f0bdcde7c902c620e2610 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 22 Mar 2021 23:06:16 +0100 Subject: [PATCH] purge complete-ci-tests, those are better covered in .gitlab-ci.yml --- .gitlab-ci.yml | 13 +++++-- MANIFEST.in | 1 - README.md | 3 +- tests/complete-ci-tests | 76 ----------------------------------------- 4 files changed, 11 insertions(+), 82 deletions(-) delete mode 100755 tests/complete-ci-tests diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 61cc21e3..5a40719f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,12 +5,19 @@ variables: GIT_DEPTH: 1 -test: +ci-images-base run-tests: image: registry.gitlab.com/fdroid/ci-images-base script: - $pip install -e .[test] - - cd tests - - ./complete-ci-tests + - ./tests/run-tests + # make sure that translations do not cause stacktraces + - cd $CI_PROJECT_DIR/locale + - for locale in *; do + test -d $locale || continue; + for cmd in `sed -n 's/.*("\(.*\)", *_.*/\1/p' $CI_PROJECT_DIR/fdroid`; do + LANGUAGE=$locale $CI_PROJECT_DIR/fdroid $cmd --help > /dev/null; + done + done # Test that the parsing of the .yml metadata format didn't change from last # released version. This uses the commit ID of the release tags, diff --git a/MANIFEST.in b/MANIFEST.in index 1a9469a6..7f478ba8 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -542,7 +542,6 @@ include tests/build-tools/generate.sh include tests/check-fdroid-apk include tests/checkupdates.TestCase include tests/common.TestCase -include tests/complete-ci-tests include tests/config.py include tests/corrupt-featureGraphic.png include tests/deploy.TestCase diff --git a/README.md b/README.md index e1d9b970..19b19a08 100644 --- a/README.md +++ b/README.md @@ -56,11 +56,10 @@ The test suite for all of the `fdroid` commands is in the _tests/_ subdir. _.gitlab-ci.yml_ and _.travis.yml_ run this test suite on various configurations. -* _tests/complete-ci-tests_ runs _pylint_ and all tests on two - different pyvenvs * _tests/run-tests_ runs the whole test suite * _tests/*.TestCase_ are individual unit tests for all of the `fdroid` commands, which can be run separately, e.g. `./update.TestCase`. +* run one test: `tests/common.TestCase CommonTest.test_get_apk_id` #### Additional tests for different linux distributions diff --git a/tests/complete-ci-tests b/tests/complete-ci-tests deleted file mode 100755 index 07e0b2a0..00000000 --- a/tests/complete-ci-tests +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash -# -# this is the script run by the Jenkins and gitlab-ci continuous integration -# build services. It is a thorough set of tests that runs all the tests using -# the various methods of installing/running fdroidserver. It is separate from -# ./tests/run-tests because its too heavy for manual use. - -if [ `dirname $0` != "." ]; then - echo "only run this script like ./`basename $0`" - exit 1 -fi - -set -e -set -x - -if [ -z $WORKSPACE ]; then - WORKSPACE=`cd $(dirname $0)/.. && pwd` - echo "Setting Workspace to $WORKSPACE" -fi - -if [ -z $ANDROID_HOME ]; then - if [ -e ~/.android/bashrc ]; then - . ~/.android/bashrc - else - echo "ANDROID_HOME must be set!" - exit 1 - fi -fi - -if ! which pyvenv; then - echo "pyvenv required to run this test suite!" - exit 1 -fi - -apksource=$1 - -#------------------------------------------------------------------------------# -# cache pypi downloads -if [ -z $PIP_DOWNLOAD_CACHE ]; then - export PIP_DOWNLOAD_CACHE=$HOME/.pip_download_cache -fi - -#------------------------------------------------------------------------------# -# run local tests, don't scan fdroidserver/ project for APKs - -cd $WORKSPACE/tests -./run-tests $apksource - - -#------------------------------------------------------------------------------# -# make sure that translations do not cause stacktraces -cd $WORKSPACE/locale -for locale in *; do - if [ ! -d $locale ]; then - continue - fi - for cmd in `sed -n 's/.*("\(.*\)", *_.*/\1/p' $WORKSPACE/fdroid`; do - LANGUAGE=$locale $WORKSPACE/fdroid $cmd --help > /dev/null - done -done - - -#------------------------------------------------------------------------------# -# test install using install direct from git repo -cd $WORKSPACE -rm -rf $WORKSPACE/env -pyvenv $WORKSPACE/env -. $WORKSPACE/env/bin/activate -pip3 install --quiet -e $WORKSPACE[test] -python3 setup.py compile_catalog install - -# 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