summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDeepanshu Gupta <deepanshu@google.com>2015-01-07 11:22:22 -0800
committerDeepanshu Gupta <deepanshu@google.com>2015-01-07 11:22:22 -0800
commitd657b149274aeba0561e68f7172907b300d1b452 (patch)
tree0cb166a4c564a6618250f91886c1886a8551f501 /tools
parent48603a39d4dd721d231c99e10908f4f00c4ec6b9 (diff)
downloadframeworks_base-d657b149274aeba0561e68f7172907b300d1b452.zip
frameworks_base-d657b149274aeba0561e68f7172907b300d1b452.tar.gz
frameworks_base-d657b149274aeba0561e68f7172907b300d1b452.tar.bz2
Fix tests on jenkins, take 2.
Change-Id: I67386c34a7abd7c3afdf9f0768f36f4786399be0
Diffstat (limited to 'tools')
-rw-r--r--tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
index 8085be1..96725af 100644
--- a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
+++ b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
@@ -76,7 +76,10 @@ public class Main {
private static final String PLATFORM_DIR;
private static final String TEST_RES_DIR;
- private static final String APP_TEST_RES = "/testApp/MyApplication/src/main/res";
+ /** Location of the app to test inside {@link #TEST_RES_DIR}*/
+ private static final String APP_TEST_DIR = "/testApp/MyApplication";
+ /** Location of the app's res dir inside {@link #TEST_RES_DIR}*/
+ private static final String APP_TEST_RES = APP_TEST_DIR + "/src/main/res";
private LayoutLog mLayoutLibLog;
private FrameworkResources mFrameworkRepo;
@@ -281,10 +284,9 @@ public class Main {
getLogger().error(session.getResult().getException(),
session.getResult().getErrorMessage());
}
- String goldenDataDir = APP_TEST_RES + "/../../../golden/";
try {
- goldenDataDir = new File(goldenDataDir).getAbsolutePath();
- ImageUtils.requireSimilar(goldenDataDir + "activity.png", session.getImage());
+ String goldenImagePath = APP_TEST_DIR + "/golden/activity.png";
+ ImageUtils.requireSimilar(goldenImagePath, session.getImage());
} catch (IOException e) {
getLogger().error(e, e.getMessage());
}