chiark / gitweb /
btlog: test with `fdroid update` without requiring ssh access
authorHans-Christoph Steiner <hans@eds.org>
Mon, 3 Apr 2017 21:16:39 +0000 (23:16 +0200)
committerHans-Christoph Steiner <hans@eds.org>
Mon, 3 Apr 2017 21:17:03 +0000 (23:17 +0200)
Yay git!  Just use a filesystem git remote instead of ssh.

fdroidserver/update.py
tests/run-tests

index 652dd1fb8bea520fd4365ab392e2b39bfc391ac3..e26388b60bbfc54ffe721c993547e772c87bc6f7 100644 (file)
@@ -1408,8 +1408,9 @@ def main():
     if len(repodirs) > 1:
         index.make(apps, sortedids, archapks, repodirs[1], True)
 
-    if config.get('binary_transparency_remote'):
-        btlog.make_binary_transparency_log(repodirs, git_remote=config['binary_transparency_remote'])
+    git_remote = config.get('binary_transparency_remote')
+    if git_remote or os.path.isdir(os.path.join('binary_transparency', '.git')):
+        btlog.make_binary_transparency_log(repodirs, git_remote=git_remote)
 
     if config['update_stats']:
         # Update known apks info...
index 743cc766ba0ca20c6acd0604a7d627d7860a4863..d0ccf083e3a1dd3f7075b4756e06103ceaaad5fc 100755 (executable)
@@ -592,12 +592,15 @@ echo_header "copy tests/repo, update with binary transparency log"
 REPOROOT=`create_test_dir`
 GNUPGHOME=$REPOROOT/gnupghome
 KEYSTORE=$WORKSPACE/tests/keystore.jks
+mkdir $REPOROOT/git_remote
+cd $REPOROOT/git_remote
+git init --bare
 cd $REPOROOT
 $fdroid init --keystore $KEYSTORE --repo-keyalias=sova
 cp -a $WORKSPACE/tests/metadata $WORKSPACE/tests/repo $WORKSPACE/tests/stats $REPOROOT/
 echo 'keystorepass = "r9aquRHYoI8+dYz6jKrLntQ5/NJNASFBacJh7Jv2BlI="' >> config.py
 echo 'keypass = "r9aquRHYoI8+dYz6jKrLntQ5/NJNASFBacJh7Jv2BlI="' >> config.py
-echo 'binary_transparency_remote = "git@gitlab.com:fdroid-continuous-integration/binary-transparency.git"' >> config.py
+echo "binary_transparency_remote = '$REPOROOT/git_remote'" >> config.py
 echo "accepted_formats = ['json', 'txt', 'yml']" >> config.py
 $fdroid update --verbose --pretty
 test -e repo/index.xml
@@ -606,6 +609,8 @@ test -e repo/index-v1.jar
 grep -F '<application id=' repo/index.xml > /dev/null
 cd binary_transparency
 [ `git rev-list --count HEAD` == "2" ]
+cd $REPOROOT/git_remote
+[ `git rev-list --count HEAD` == "2" ]
 
 
 #------------------------------------------------------------------------------#