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

Commit 48983959 authored by Brian Muramatsu's avatar Brian Muramatsu
Browse files

Fix NPE in InstrumentationTestRunner

This fixes a problem where the test runner would die when a
test case has tests that are not methods of the test class.

Change-Id: I5adc464bb4a0c8d282428895e422a47dcb6bfe1f
parent 81c4cea9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -785,7 +785,7 @@ public class InstrumentationTestRunner extends Instrumentation implements TestSu
            mIncludeDetailedStats = false;
            try {
                // Look for TimedTest annotation on both test class and test method
                if (testMethod.isAnnotationPresent(TimedTest.class)) {
                if (testMethod != null && testMethod.isAnnotationPresent(TimedTest.class)) {
                    mIsTimedTest = true;
                    mIncludeDetailedStats = testMethod.getAnnotation(
                            TimedTest.class).includeDetailedStats();