summaryrefslogtreecommitdiffstats
path: root/tests/DumpRenderTree2/src
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-09-13 15:50:12 +0100
committerSteve Block <steveblock@google.com>2010-09-13 15:51:11 +0100
commit34c68912be678ad50a70c1bfa54a91444e993df5 (patch)
treee34191b689c076974871fd5e4dd163a3fb64bf4a /tests/DumpRenderTree2/src
parent7438b53487cb21f261eac4396aba0dbaa16ee015 (diff)
downloadframeworks_base-34c68912be678ad50a70c1bfa54a91444e993df5.zip
frameworks_base-34c68912be678ad50a70c1bfa54a91444e993df5.tar.gz
frameworks_base-34c68912be678ad50a70c1bfa54a91444e993df5.tar.bz2
Remove the last remnants in DumpRenderTree2 of the absolute path to the tests
This is no longer required. Change-Id: I27db10e8c723162b319d9a714b086f508db706e0
Diffstat (limited to 'tests/DumpRenderTree2/src')
-rw-r--r--tests/DumpRenderTree2/src/com/android/dumprendertree2/FileFilter.java40
-rw-r--r--tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java6
-rw-r--r--tests/DumpRenderTree2/src/com/android/dumprendertree2/ManagerService.java10
-rw-r--r--tests/DumpRenderTree2/src/com/android/dumprendertree2/TestsListPreloaderThread.java10
-rw-r--r--tests/DumpRenderTree2/src/com/android/dumprendertree2/ui/DirListActivity.java13
5 files changed, 8 insertions, 71 deletions
diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/FileFilter.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/FileFilter.java
index 4ab76e3..9bbf64a 100644
--- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/FileFilter.java
+++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/FileFilter.java
@@ -56,12 +56,7 @@ public class FileFilter {
private final Set<String> mFailList = new HashSet<String>();
private final Set<String> mSlowList = new HashSet<String>();
- private final String mRootDirPath;
-
- public FileFilter(String rootDirPath) {
- /** It may or may not contain a trailing slash */
- this.mRootDirPath = rootDirPath;
-
+ public FileFilter() {
loadTestExpectations();
}
@@ -287,37 +282,6 @@ public class FileFilter {
}
/**
- * Return the path to the file relative to the tests root dir
- *
- * @param filePath
- * @return
- * the path relative to the tests root dir
- */
- public String getRelativePath(String filePath) {
- File rootDir = new File(mRootDirPath);
- return filePath.replaceFirst(rootDir.getPath() + File.separator, "");
- }
-
- /**
- * Return the path to the file relative to the tests root dir
- *
- * @param filePath
- * @return
- * the path relative to the tests root dir
- */
- public String getRelativePath(File file) {
- return getRelativePath(file.getAbsolutePath());
- }
-
- public File getAbsoluteFile(String relativePath) {
- return new File(mRootDirPath, relativePath);
- }
-
- public String getAboslutePath(String relativePath) {
- return getAbsoluteFile(relativePath).getAbsolutePath();
- }
-
- /**
* If the path contains extension (e.g .foo at the end of the file) then it changes
* this (.foo) into newEnding (so it has to contain the dot if we want to preserve it).
*
@@ -336,4 +300,4 @@ public class FileFilter {
return relativePath.substring(0, dotPos) + newEnding;
}
-} \ No newline at end of file
+}
diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java
index 0bd2302..93bb6a0 100644
--- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java
+++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java
@@ -73,12 +73,6 @@ public class LayoutTestsExecutor extends Activity {
}
}
- /** TODO: make it a setting */
- static final String TESTS_ROOT_DIR_PATH =
- Environment.getExternalStorageDirectory() +
- File.separator + "android" +
- File.separator + "LayoutTests";
-
private static final String LOG_TAG = "LayoutTestExecutor";
public static final String EXTRA_TESTS_LIST = "TestsList";
diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/ManagerService.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/ManagerService.java
index d9da672..ea49617 100644
--- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/ManagerService.java
+++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/ManagerService.java
@@ -43,12 +43,6 @@ public class ManagerService extends Service {
private static final int CRASH_TIMEOUT_MS = 20 * 1000;
/** TODO: make it a setting */
- static final String TESTS_ROOT_DIR_PATH =
- Environment.getExternalStorageDirectory() +
- File.separator + "android" +
- File.separator + "LayoutTests";
-
- /** TODO: make it a setting */
static final String RESULTS_ROOT_DIR_PATH =
Environment.getExternalStorageDirectory() +
File.separator + "android" +
@@ -141,7 +135,7 @@ public class ManagerService extends Service {
public void onCreate() {
super.onCreate();
- mFileFilter = new FileFilter(TESTS_ROOT_DIR_PATH);
+ mFileFilter = new FileFilter();
mSummarizer = new Summarizer(mFileFilter, RESULTS_ROOT_DIR_PATH);
}
@@ -283,4 +277,4 @@ public class ManagerService extends Service {
return mLastExpectedResultPathFetched;
}
-} \ No newline at end of file
+}
diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/TestsListPreloaderThread.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/TestsListPreloaderThread.java
index c714ec4..e0f1450 100644
--- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/TestsListPreloaderThread.java
+++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/TestsListPreloaderThread.java
@@ -29,12 +29,6 @@ public class TestsListPreloaderThread extends Thread {
private static final String LOG_TAG = "TestsListPreloaderThread";
- /** TODO: make it a setting */
- private static final String TESTS_ROOT_DIR_PATH =
- Environment.getExternalStorageDirectory() +
- File.separator + "android" +
- File.separator + "LayoutTests";
-
/** A list containing relative paths of tests to run */
private ArrayList<String> mTestsList = new ArrayList<String>();
@@ -55,7 +49,7 @@ public class TestsListPreloaderThread extends Thread {
* @param doneMsg
*/
public TestsListPreloaderThread(String path, Message doneMsg) {
- mFileFilter = new FileFilter(TESTS_ROOT_DIR_PATH);
+ mFileFilter = new FileFilter();
mRelativePath = path;
mDoneMsg = doneMsg;
}
@@ -112,4 +106,4 @@ public class TestsListPreloaderThread extends Thread {
}
}
}
-} \ No newline at end of file
+}
diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/ui/DirListActivity.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/ui/DirListActivity.java
index b1862ef..7660677 100644
--- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/ui/DirListActivity.java
+++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/ui/DirListActivity.java
@@ -56,10 +56,6 @@ import java.util.List;
public class DirListActivity extends ListActivity {
private static final String LOG_TAG = "DirListActivity";
- private static final String ROOT_DIR_PATH =
- Environment.getExternalStorageDirectory() +
- File.separator + "android" +
- File.separator + "LayoutTests";
/** TODO: This is just a guess - think of a better way to achieve it */
private static final int MEAN_TITLE_CHAR_SIZE = 13;
@@ -81,11 +77,6 @@ public class DirListActivity extends ListActivity {
/** This is a relative path! */
private String mCurrentDirPath;
- /**
- * TODO: This should not be a constant, but rather be configurable from somewhere.
- */
- private String mRootDirPath = ROOT_DIR_PATH;
-
private FileFilter mFileFilter;
/**
@@ -196,7 +187,7 @@ public class DirListActivity extends ListActivity {
ForwarderManager.getForwarderManager().start();
- mFileFilter = new FileFilter(ROOT_DIR_PATH);
+ mFileFilter = new FileFilter();
mListView = getListView();
mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@@ -420,4 +411,4 @@ public class DirListActivity extends ListActivity {
return subDirs.toArray(new ListItem[subDirs.size()]);
}
-} \ No newline at end of file
+}