Loading tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java +8 −1 Original line number Diff line number Diff line Loading @@ -223,7 +223,10 @@ public class LayoutTestsAutoTest extends ActivityInstrumentationTestCase2<TestSh } private String getExpectedResultFile(String test) { String shortName = test.substring(0, test.lastIndexOf('.')); int pos = test.lastIndexOf('.'); if(pos == -1) return null; String shortName = test.substring(0, pos); return shortName + "-expected.txt"; } Loading Loading @@ -303,6 +306,10 @@ public class LayoutTestsAutoTest extends ActivityInstrumentationTestCase2<TestSh }); String resultFile = getResultFile(test); if(resultFile == null) { //simply ignore this test return; } if (mRebaselineResults) { String expectedResultFile = getExpectedResultFile(test); File f = new File(expectedResultFile); Loading tests/DumpRenderTree/src/com/android/dumprendertree/LoadTestsAutoTest.java +10 −2 Original line number Diff line number Diff line Loading @@ -69,11 +69,14 @@ public class LoadTestsAutoTest extends ActivityInstrumentationTestCase2<TestShel TestShellActivity activity = (TestShellActivity) getActivity(); Log.v(LOGTAG, "About to run tests, calling gc first..."); Runtime.getRuntime().runFinalization(); Runtime.getRuntime().gc(); Runtime.getRuntime().gc(); // Run tests runTestAndWaitUntilDone(activity, runner.mTestPath, runner.mTimeoutInMillis); // TODO(fqian): let am instrumentation pass in the command line, currently // am instrument does not allow spaces in the command. dumpMemoryInfo(); // Kill activity Loading @@ -82,6 +85,11 @@ public class LoadTestsAutoTest extends ActivityInstrumentationTestCase2<TestShel private void dumpMemoryInfo() { try { Log.v(LOGTAG, "About to dump meminfo, calling gc first..."); Runtime.getRuntime().runFinalization(); Runtime.getRuntime().gc(); Runtime.getRuntime().gc(); Log.v(LOGTAG, "Dumping memory information."); FileOutputStream out = new FileOutputStream(LOAD_TEST_RESULT, true); Loading Loading
tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java +8 −1 Original line number Diff line number Diff line Loading @@ -223,7 +223,10 @@ public class LayoutTestsAutoTest extends ActivityInstrumentationTestCase2<TestSh } private String getExpectedResultFile(String test) { String shortName = test.substring(0, test.lastIndexOf('.')); int pos = test.lastIndexOf('.'); if(pos == -1) return null; String shortName = test.substring(0, pos); return shortName + "-expected.txt"; } Loading Loading @@ -303,6 +306,10 @@ public class LayoutTestsAutoTest extends ActivityInstrumentationTestCase2<TestSh }); String resultFile = getResultFile(test); if(resultFile == null) { //simply ignore this test return; } if (mRebaselineResults) { String expectedResultFile = getExpectedResultFile(test); File f = new File(expectedResultFile); Loading
tests/DumpRenderTree/src/com/android/dumprendertree/LoadTestsAutoTest.java +10 −2 Original line number Diff line number Diff line Loading @@ -69,11 +69,14 @@ public class LoadTestsAutoTest extends ActivityInstrumentationTestCase2<TestShel TestShellActivity activity = (TestShellActivity) getActivity(); Log.v(LOGTAG, "About to run tests, calling gc first..."); Runtime.getRuntime().runFinalization(); Runtime.getRuntime().gc(); Runtime.getRuntime().gc(); // Run tests runTestAndWaitUntilDone(activity, runner.mTestPath, runner.mTimeoutInMillis); // TODO(fqian): let am instrumentation pass in the command line, currently // am instrument does not allow spaces in the command. dumpMemoryInfo(); // Kill activity Loading @@ -82,6 +85,11 @@ public class LoadTestsAutoTest extends ActivityInstrumentationTestCase2<TestShel private void dumpMemoryInfo() { try { Log.v(LOGTAG, "About to dump meminfo, calling gc first..."); Runtime.getRuntime().runFinalization(); Runtime.getRuntime().gc(); Runtime.getRuntime().gc(); Log.v(LOGTAG, "Dumping memory information."); FileOutputStream out = new FileOutputStream(LOAD_TEST_RESULT, true); Loading