Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34c68912 authored by Steve Block's avatar Steve Block
Browse files

Remove the last remnants in DumpRenderTree2 of the absolute path to the tests

This is no longer required.

Change-Id: I27db10e8c723162b319d9a714b086f508db706e0
parent 7438b534
Loading
Loading
Loading
Loading
+2 −38
Original line number Diff line number Diff line
@@ -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();
    }

@@ -286,37 +281,6 @@ public class FileFilter {
        return null;
    }

    /**
     * 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).
+0 −6
Original line number Diff line number Diff line
@@ -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";
+2 −8
Original line number Diff line number Diff line
@@ -42,12 +42,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() +
@@ -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);
    }

+2 −8
Original line number Diff line number Diff line
@@ -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;
    }
+2 −11
Original line number Diff line number Diff line
@@ -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() {