From f483630e027e6104eabcc7247893f36ca3cd2d27 Mon Sep 17 00:00:00 2001
From: Hans-Christoph Steiner <hans@eds.org>
Date: Thu, 1 May 2014 21:44:27 -0400
Subject: [PATCH] store files for tests in the fdroid cache

For some reason, on some emulators, it is failing to find a place to write
the test index files.  But on most setups, it works fine.  So instead try
writing the files to the cacheDir of FDroid itself rather than the test app
---
 test/src/org/fdroid/fdroid/updater/SignedRepoUpdaterTest.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/src/org/fdroid/fdroid/updater/SignedRepoUpdaterTest.java b/test/src/org/fdroid/fdroid/updater/SignedRepoUpdaterTest.java
index 3f198a6e4..7a045379a 100644
--- a/test/src/org/fdroid/fdroid/updater/SignedRepoUpdaterTest.java
+++ b/test/src/org/fdroid/fdroid/updater/SignedRepoUpdaterTest.java
@@ -44,7 +44,8 @@ public class SignedRepoUpdaterTest extends InstrumentationTestCase {
         InputStream input = null;
         OutputStream output = null;
         try {
-            indexFile = File.createTempFile("index-", ".xml", context.getFilesDir());
+            indexFile = File.createTempFile("index-", ".xml",
+                    getInstrumentation().getTargetContext().getCacheDir());
             input = getInputStreamFromAssets(fileName);
             output = new FileOutputStream(indexFile);
             Utils.copy(input, output);