diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2009-11-15 12:06:20 -0800 |
---|---|---|
committer | Jean-Baptiste Queru <jbq@google.com> | 2009-11-15 12:06:23 -0800 |
commit | 478de466ce0504b9af639c3338b883893670a8e8 (patch) | |
tree | 61aba455baf06a4821a65b82d1115929619b49bd /test-runner/android/test/TestRunner.java | |
parent | 2b63ff51d5202eb2b458e937d4b65b326238733e (diff) | |
parent | 9db3d07b9620b4269ab33f78604a36327e536ce1 (diff) | |
download | frameworks_base-478de466ce0504b9af639c3338b883893670a8e8.zip frameworks_base-478de466ce0504b9af639c3338b883893670a8e8.tar.gz frameworks_base-478de466ce0504b9af639c3338b883893670a8e8.tar.bz2 |
merge from eclair
Diffstat (limited to 'test-runner/android/test/TestRunner.java')
-rw-r--r-- | test-runner/android/test/TestRunner.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test-runner/android/test/TestRunner.java b/test-runner/android/test/TestRunner.java index efa2480..012df35 100644 --- a/test-runner/android/test/TestRunner.java +++ b/test-runner/android/test/TestRunner.java @@ -39,7 +39,7 @@ import com.google.android.collect.Lists; * and you probably will not need to instantiate, extend, or call this * class yourself. See the full {@link android.test} package description * to learn more about testing Android applications. - * + * * {@hide} Not needed for 1.0 SDK. */ public class TestRunner implements PerformanceTestCase.Intermediates { @@ -84,6 +84,7 @@ public class TestRunner implements PerformanceTestCase.Intermediates { super(); } + @Override public void run(TestResult result) { result.addListener(this); super.run(result); @@ -301,7 +302,7 @@ public class TestRunner implements PerformanceTestCase.Intermediates { if (mMode == PERFORMANCE) { runInPerformanceMode(test, className, false, className); } else if (mMode == PROFILING) { - //Need a way to mark a test to be run in profiling mode or not. + //Need a way to mark a test to be run in profiling mode or not. startProfiling(); test.run(); finishProfiling(); @@ -337,6 +338,7 @@ public class TestRunner implements PerformanceTestCase.Intermediates { AndroidTestCase testcase = (AndroidTestCase) test; try { testcase.setContext(mContext); + testcase.setTestContext(mContext); } catch (Exception ex) { Log.i("TestHarness", ex.toString()); } @@ -700,7 +702,7 @@ public class TestRunner implements PerformanceTestCase.Intermediates { } } catch (ClassNotFoundException e) { return 1; // this gets the count right, because either this test - // is missing, and it will fail when run or it is a single Junit test to be run. + // is missing, and it will fail when run or it is a single Junit test to be run. } return 0; } |