tests: move test APK with bad unicode filename to separate test

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.
This commit is contained in:
Hans-Christoph Steiner 2017-09-19 16:48:20 +02:00
parent 5dcb48831f
commit 6adf309bef
5 changed files with 4 additions and 4 deletions

View file

@ -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