From afac1b2efd2152ffbb73091eb1a01a95ff1e51f5 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 25 May 2017 20:39:15 +0200 Subject: [PATCH] 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 --- tests/run-tests | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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" -- 2.30.2