From: Hans-Christoph Steiner Date: Thu, 25 May 2017 18:39:15 +0000 (+0200) Subject: add basic test for `fdroid scanner` X-Git-Tag: 0.8~49^2~8 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=afac1b2efd2152ffbb73091eb1a01a95ff1e51f5;p=fdroidserver.git add basic test for `fdroid scanner` There was no test coverage at all for this command, this is a very basic test that should prevent things like 2626858450953ac65124765d2cd73d1602846372 --- diff --git a/tests/run-tests b/tests/run-tests index f640322e..931d6e06 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -178,6 +178,28 @@ else echo 'WARNING: Skipping `fdroid build` test since android-23 is missing!' fi +#------------------------------------------------------------------------------# +echo_header 'copy git import and run `fdroid scanner` on it' + +REPOROOT=`create_test_dir` +cd $REPOROOT +touch config.py +cp $WORKSPACE/examples/fdroid-icon.png $REPOROOT/ +mkdir metadata +echo "Auto Name:Just A Test" > metadata/org.fdroid.ci.test.app.txt +echo "Web Site:" >> metadata/org.fdroid.ci.test.app.txt +echo "Build:0.3,300" >> metadata/org.fdroid.ci.test.app.txt +echo " commit=0.3" >> metadata/org.fdroid.ci.test.app.txt +echo " subdir=app" >> metadata/org.fdroid.ci.test.app.txt +echo " gradle=yes" >> metadata/org.fdroid.ci.test.app.txt +echo "" >> metadata/org.fdroid.ci.test.app.txt +echo "Repo:https://gitlab.com/fdroid/ci-test-app.git" >> metadata/org.fdroid.ci.test.app.txt +echo "Repo Type:git" >> metadata/org.fdroid.ci.test.app.txt +mkdir build +cp -a $WORKSPACE/tests/tmp/importer build/org.fdroid.ci.test.app +ls -l build/org.fdroid.ci.test.app +$fdroid scanner org.fdroid.ci.test.app --verbose + #------------------------------------------------------------------------------# echo_header "copy tests/repo, generate java/gpg keys, update, and gpgsign"