From 98ed17ca9d6cd984eb4c31099d5e7b2f4d63aa5d Mon Sep 17 00:00:00 2001 From: Stephan Schmitz Date: Mon, 18 Nov 2013 13:42:46 +0100 Subject: [PATCH] Windows build fix (skip checking files in /values* for test application). I didn't tracked down where the issue comes from and whether this is expected behaviour (actually I doubt). But when building on Windows, the test trys to create a strings.xml in "values-mcc004-mnc4-en-rUS-ldrtl-sw100dp-w200dp-h300dp-xlarge-long-land-desk-night-xhdpi-finger-keyssoft-12key-navhidden-dpad". This exceeds the max length for file/directory names in Windows and therefore the build aborts. Because this was currently the only issue that breaks building on Windows (when https://github.com/eyecatchup/Apktool/commit/073019fa541d17c16c6ca8e628f5e7a48285e639 is applied), this workaround should do the trick (for now). --- .../src/test/java/brut/androlib/BuildAndDecodeTest.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/BuildAndDecodeTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/BuildAndDecodeTest.java index f2b4c3e0..fe56bcff 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/BuildAndDecodeTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/BuildAndDecodeTest.java @@ -161,9 +161,11 @@ public class BuildAndDecodeTest { @Test public void qualifiersTest() throws BrutException { - compareValuesFiles("values-mcc004-mnc4-en-rUS-ldrtl-sw100dp-w200dp-h300dp" - + "-xlarge-long-land-desk-night-xhdpi-finger-keyssoft-12key" - + "-navhidden-dpad/strings.xml"); + if (!System.getProperty("os.name").toLowerCase().contains("windows")) { + compareValuesFiles("values-mcc004-mnc4-en-rUS-ldrtl-sw100dp-w200dp-h300dp" + + "-xlarge-long-land-desk-night-xhdpi-finger-keyssoft-12key" + + "-navhidden-dpad/strings.xml"); + } } @Test