chiark / gitweb /
tests: move test APK with bad unicode filename to separate test
authorHans-Christoph Steiner <hans@eds.org>
Tue, 19 Sep 2017 14:48:20 +0000 (16:48 +0200)
committerHans-Christoph Steiner <hans@eds.org>
Tue, 19 Sep 2017 18:13:36 +0000 (20:13 +0200)
This filename has some messed up bytes related to bi-directional script
that is included (Left-to-Right and Right-to-Left).  GNU/Linux always
interprets filenames as pure byte sequences.  Windows and OSX store
filenames as Unicode strings.  So on OSX, the invalid filename gets
converted to a valid name.  That works fine, but the test fails because it
is compared to a file generated on Ubuntu, where it preserves the byte
sequence.

This includes an APK with a valid Unicode filename that includes
bi-directional script.

tests/bad-unicode-πÇÇπÇÇ现代汉语通用字-български-عربي1234.apk [moved from tests/repo/urzip-πÇÇπÇÇ现代汉语通用字-български-عربي1234.apk with 100% similarity]
tests/repo/index.xml
tests/repo/urzip-Sergey Vasilyevich Rakhmaninov; Серге́й Васи́льевич Рахма́нинов, IPA: [sʲɪrˈɡʲej rɐxˈmanʲɪnəf] سيرجي_رخمانينوف 谢尔盖·瓦西里耶维奇·拉赫玛.apk尼诺夫 .apk [new file with mode: 0644]
tests/run-tests
tests/stats/known_apks.txt

index 9836fc3e5b00b5af4e6810bd86983c38eefe6e4e..a2eb17e3dc64c89d803da02b260f58c6471da01e 100644 (file)
                <package>
                        <version>0.1</version>
                        <versioncode>100</versioncode>
-                       <apkname>urzip-πÇÇπÇÇ现代汉语通用字-български-عربي1234.apk</apkname>
+                       <apkname>urzip-Sergey Vasilyevich Rakhmaninov; Серге́й Васи́льевич Рахма́нинов, IPA: [sʲɪrˈɡʲej rɐxˈmanʲɪnəf] سيرجي_رخمانينوف 谢尔盖·瓦西里耶维奇·拉赫玛.apk尼诺夫 .apk</apkname>
                        <hash type="sha256">15c0ec72c74a3791f42cdb43c57df0fb11a4dbb656851bbb8cf05b26a8372789</hash>
                        <size>11471</size>
                        <sdkver>4</sdkver>
diff --git a/tests/repo/urzip-Sergey Vasilyevich Rakhmaninov; Серге́й Васи́льевич Рахма́нинов, IPA: [sʲɪrˈɡʲej rɐxˈmanʲɪnəf] سيرجي_رخمانينوف 谢尔盖·瓦西里耶维奇·拉赫玛.apk尼诺夫 .apk b/tests/repo/urzip-Sergey Vasilyevich Rakhmaninov; Серге́й Васи́льевич Рахма́нинов, IPA: [sʲɪrˈɡʲej rɐxˈmanʲɪnəf] سيرجي_رخمانينوف 谢尔盖·瓦西里耶维奇·拉赫玛.apk尼诺夫 .apk
new file mode 100644 (file)
index 0000000..0851e06
Binary files /dev/null and "b/tests/repo/urzip-Sergey Vasilyevich Rakhmaninov; \320\241\320\265\321\200\320\263\320\265\314\201\320\270\314\206 \320\222\320\260\321\201\320\270\314\201\320\273\321\214\320\265\320\262\320\270\321\207 \320\240\320\260\321\205\320\274\320\260\314\201\320\275\320\270\320\275\320\276\320\262, IPA: [s\312\262\311\252r\313\210\311\241\312\262ej r\311\220x\313\210man\312\262\311\252n\311\231f] \330\263\331\212\330\261\330\254\331\212_\330\261\330\256\331\205\330\247\331\206\331\212\331\206\331\210\331\201 \350\260\242\345\260\224\347\233\226\302\267\347\223\246\350\245\277\351\207\214\350\200\266\347\273\264\345\245\207\302\267\346\213\211\350\265\253\347\216\233.apk\345\260\274\350\257\272\345\244\253 .apk" differ
index c58942bdd14cf1bb42e2af62ccb8640d472a82fa..8558794e0145193de025233c53c8b81f2b01da96 100755 (executable)
@@ -8,7 +8,7 @@ echo_header() {
 
 copy_apks_into_repo() {
     set +x
-    for f in `find $APKDIR -name '*.apk' | grep -F -v -e unaligned -e unsigned -e badsig -e badcert`; do
+    for f in `find $APKDIR -name '*.apk' | grep -F -v -e unaligned -e unsigned -e badsig -e badcert -e bad-unicode`; do
         name=$(basename $(dirname `dirname $f`))
         apk=`$aapt dump badging "$f" | sed -n "s,^package: name='\(.*\)' versionCode='\([0-9][0-9]*\)' .*,\1_\2.apk,p"`
         test $f -nt repo/$apk && rm -f repo/$apk  # delete existing if $f is newer
@@ -157,7 +157,7 @@ $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/urzip.apk $WORKSPACE/tests/bad-unicode*.apk repo/
 cp $WORKSPACE/tests/metadata/info.guardianproject.urzip.yml metadata/
 
 $fdroid readmeta
index 6d457a6ffd027c3346e92a4a6733699743bbfe3f..b9fd7f4bcd3079bc3af5d6b849cc005e18fbeec0 100644 (file)
@@ -9,4 +9,4 @@ obb.main.twoversions_1101615.apk obb.main.twoversions 2016-01-01
 obb.main.twoversions_1101617.apk obb.main.twoversions 2016-06-20
 obb.mainpatch.current_1619.apk obb.mainpatch.current 2016-04-23
 obb.mainpatch.current_1619_another-release-key.apk obb.mainpatch.current 2017-06-01
-urzip-πÇÇπÇÇ现代汉语通用字-български-عربي1234.apk info.guardianproject.urzip 2016-06-23
+urzip-Sergey Vasilyevich Rakhmaninov; Серге́й Васи́льевич Рахма́нинов, IPA: [sʲɪrˈɡʲej rɐxˈmanʲɪnəf] سيرجي_رخمانينوف 谢尔盖·瓦西里耶维奇·拉赫玛.apk尼诺夫 .apk info.guardianproject.urzip 2016-06-23