chiark / gitweb /
FDroidPopen must have a locale to support UTF-8 filenames
[fdroidserver.git] / tests / run-tests
index dfdda5ad01ff39f935c079d40a46a427cd9358bc..c55319da8ada9f97841b0735585b4561b58b17f9 100755 (executable)
@@ -83,7 +83,7 @@ fi
 
 # allow the location of python to be overridden
 if [ -z $python ]; then
-    python=python2
+    python=python3
 fi
 
 set -x # show each command as it is executed
@@ -129,6 +129,7 @@ cd $REPOROOT
 
 $fdroid init
 sed -i.tmp 's,^ *repo_description.*,repo_description = """获取已安装在您的设备上的应用的,' config.py
+echo "mirrors = {'https://foo.bar/fdroid', 'http://secret.onion/fdroid'}" >> config.py
 mkdir metadata
 cp $WORKSPACE/tests/urzip.apk repo/
 cp $WORKSPACE/tests/metadata/info.guardianproject.urzip.txt metadata/
@@ -137,6 +138,20 @@ $fdroid readmeta
 $fdroid update
 
 
+#------------------------------------------------------------------------------#
+echo_header "copy tests/repo, generate a keystore, and update"
+
+REPOROOT=`create_test_dir`
+cd $REPOROOT
+$fdroid init
+cp -a $WORKSPACE/tests/metadata $WORKSPACE/tests/repo $REPOROOT/
+echo "accepted_formats = ['json', 'txt', 'xml', 'yml']" >> config.py
+$fdroid update --verbose
+test -e repo/index.xml
+test -e repo/index.jar
+grep -F '<application id=' repo/index.xml > /dev/null
+
+
 #------------------------------------------------------------------------------#
 echo_header "test metadata checks"
 
@@ -162,7 +177,7 @@ cp $WORKSPACE/tests/metadata/org.smssecure.smssecure.txt $REPOROOT/metadata/
 $fdroid readmeta
 
 # now make a fake duplicate
-touch $REPOROOT/metadata/org.smssecure.smssecure.yaml
+touch $REPOROOT/metadata/org.smssecure.smssecure.yml
 
 set +e
 $fdroid readmeta