chiark / gitweb /
add basic test for `fdroid scanner`
authorHans-Christoph Steiner <hans@eds.org>
Thu, 25 May 2017 18:39:15 +0000 (20:39 +0200)
committerHans-Christoph Steiner <hans@eds.org>
Tue, 30 May 2017 19:13:49 +0000 (21:13 +0200)
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

index f640322ec8bebf727cfa88cf3d82d026205f1b51..931d6e069c6d05724c988d0dd0e35aa9ada3ce19 100755 (executable)
@@ -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"