From 9c5b19e1b932888d3e347fa529b82f5417b28a5e Mon Sep 17 00:00:00 2001 From: "David T.H. Kao" Date: Wed, 18 Jul 2018 11:39:31 -0700 Subject: [PATCH] Replace some android.support references with androidx (#468) * replace android.support references with androidx * clarify in documentation that package for android.support is in flux * make it a todo partially addresses #470 --- mobly/base_instrumentation_test.py | 4 + tests/mobly/base_instrumentation_test_test.py | 80 +++++++++---------- 2 files changed, 44 insertions(+), 40 deletions(-) diff --git a/mobly/base_instrumentation_test.py b/mobly/base_instrumentation_test.py index 218be6a8..1a28de7e 100644 --- a/mobly/base_instrumentation_test.py +++ b/mobly/base_instrumentation_test.py @@ -85,6 +85,8 @@ class _InstrumentationKnownStatusKeys(object): android.app.Instrumentation android.support.test.internal.runner.listener.InstrumentationResultPrinter + TODO: Convert android.support.* to androidx.*, + (https://android-developers.googleblog.com/2018/05/hello-world-androidx.html). """ CLASS = 'class' @@ -119,6 +121,8 @@ class _InstrumentationStatusCodes(object): android.support.test.internal.runner.listener.InstrumentationResultPrinter + TODO: Convert android.support.* to androidx.*, + (https://android-developers.googleblog.com/2018/05/hello-world-androidx.html). """ UNKNOWN = None diff --git a/tests/mobly/base_instrumentation_test_test.py b/tests/mobly/base_instrumentation_test_test.py index 64cd09c8..8dc5e5f0 100755 --- a/tests/mobly/base_instrumentation_test_test.py +++ b/tests/mobly/base_instrumentation_test_test.py @@ -418,9 +418,9 @@ def test_run_instrumentation_test_with_failing_test(self): at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:59) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) - at android.support.test.internal.runner.junit4.statement.RunBefores.evaluate(RunBefores.java:80) - at android.support.test.internal.runner.junit4.statement.RunAfters.evaluate(RunAfters.java:61) - at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433) + at androidx.test.internal.runner.junit4.statement.RunBefores.evaluate(RunBefores.java:80) + at androidx.test.internal.runner.junit4.statement.RunAfters.evaluate(RunAfters.java:61) + at androidx.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433) at com.my.package.test.BaseTest$3.evaluate(BaseTest.java:96) at com.my.package.test.BaseTest$4.evaluate(BaseTest.java:109) at com.my.package.test.BaseTest$2.evaluate(BaseTest.java:77) @@ -437,7 +437,7 @@ def test_run_instrumentation_test_with_failing_test(self): at org.junit.runners.ParentRunner.access$000(ParentRunner.java:60) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:270) at org.junit.runners.ParentRunner.run(ParentRunner.java:370) - at android.support.test.runner.AndroidJUnit4.run(AndroidJUnit4.java:99) + at androidx.test.runner.AndroidJUnit4.run(AndroidJUnit4.java:99) at org.junit.runners.Suite.runChild(Suite.java:128) at org.junit.runners.Suite.runChild(Suite.java:27) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:292) @@ -456,7 +456,7 @@ def test_run_instrumentation_test_with_failing_test(self): at org.junit.runners.ParentRunner.run(ParentRunner.java:370) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at org.junit.runner.JUnitCore.run(JUnitCore.java:115) - at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:56) + at androidx.test.internal.runner.TestExecutor.execute(TestExecutor.java:56) at com.my.package.test.BaseRunner.runTests(BaseRunner.java:344) at com.my.package.test.BaseRunner.onStart(BaseRunner.java:330) at com.my.package.test.runner.MyRunner.onStart(MyRunner.java:253) @@ -471,9 +471,9 @@ def test_run_instrumentation_test_with_failing_test(self): at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:59) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) - at android.support.test.internal.runner.junit4.statement.RunBefores.evaluate(RunBefores.java:80) - at android.support.test.internal.runner.junit4.statement.RunAfters.evaluate(RunAfters.java:61) - at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433) + at androidx.test.internal.runner.junit4.statement.RunBefores.evaluate(RunBefores.java:80) + at androidx.test.internal.runner.junit4.statement.RunAfters.evaluate(RunAfters.java:61) + at androidx.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433) at com.my.package.test.BaseTest$3.evaluate(BaseTest.java:96) at com.my.package.test.BaseTest$4.evaluate(BaseTest.java:109) at com.my.package.test.BaseTest$2.evaluate(BaseTest.java:77) @@ -490,7 +490,7 @@ def test_run_instrumentation_test_with_failing_test(self): at org.junit.runners.ParentRunner.access$000(ParentRunner.java:60) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:270) at org.junit.runners.ParentRunner.run(ParentRunner.java:370) - at android.support.test.runner.AndroidJUnit4.run(AndroidJUnit4.java:99) + at androidx.test.runner.AndroidJUnit4.run(AndroidJUnit4.java:99) at org.junit.runners.Suite.runChild(Suite.java:128) at org.junit.runners.Suite.runChild(Suite.java:27) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:292) @@ -509,7 +509,7 @@ def test_run_instrumentation_test_with_failing_test(self): at org.junit.runners.ParentRunner.run(ParentRunner.java:370) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at org.junit.runner.JUnitCore.run(JUnitCore.java:115) - at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:56) + at androidx.test.internal.runner.TestExecutor.execute(TestExecutor.java:56) at com.my.package.test.BaseRunner.runTests(BaseRunner.java:344) at com.my.package.test.BaseRunner.onStart(BaseRunner.java:330) at com.my.package.test.runner.MyRunner.onStart(MyRunner.java:253) @@ -529,9 +529,9 @@ def test_run_instrumentation_test_with_failing_test(self): at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:59) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) - at android.support.test.internal.runner.junit4.statement.RunBefores.evaluate(RunBefores.java:80) - at android.support.test.internal.runner.junit4.statement.RunAfters.evaluate(RunAfters.java:61) - at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433) + at androidx.test.internal.runner.junit4.statement.RunBefores.evaluate(RunBefores.java:80) + at androidx.test.internal.runner.junit4.statement.RunAfters.evaluate(RunAfters.java:61) + at androidx.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433) at com.my.package.test.BaseTest$3.evaluate(BaseTest.java:96) at com.my.package.test.BaseTest$4.evaluate(BaseTest.java:109) at com.my.package.test.BaseTest$2.evaluate(BaseTest.java:77) @@ -548,7 +548,7 @@ def test_run_instrumentation_test_with_failing_test(self): at org.junit.runners.ParentRunner.access$000(ParentRunner.java:60) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:270) at org.junit.runners.ParentRunner.run(ParentRunner.java:370) - at android.support.test.runner.AndroidJUnit4.run(AndroidJUnit4.java:99) + at androidx.test.runner.AndroidJUnit4.run(AndroidJUnit4.java:99) at org.junit.runners.Suite.runChild(Suite.java:128) at org.junit.runners.Suite.runChild(Suite.java:27) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:292) @@ -567,7 +567,7 @@ def test_run_instrumentation_test_with_failing_test(self): at org.junit.runners.ParentRunner.run(ParentRunner.java:370) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at org.junit.runner.JUnitCore.run(JUnitCore.java:115) - at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:56) + at androidx.test.internal.runner.TestExecutor.execute(TestExecutor.java:56) at com.my.package.test.BaseRunner.runTests(BaseRunner.java:344) at com.my.package.test.BaseRunner.onStart(BaseRunner.java:330) at com.my.package.test.runner.MyRunner.onStart(MyRunner.java:253) @@ -607,9 +607,9 @@ def test_run_instrumentation_test_with_assumption_failure_test(self): at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:59) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) - at android.support.test.internal.runner.junit4.statement.RunBefores.evaluate(RunBefores.java:80) - at android.support.test.internal.runner.junit4.statement.RunAfters.evaluate(RunAfters.java:61) - at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433) + at androidx.test.internal.runner.junit4.statement.RunBefores.evaluate(RunBefores.java:80) + at androidx.test.internal.runner.junit4.statement.RunAfters.evaluate(RunAfters.java:61) + at androidx.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433) at com.my.package.test.MyBaseTest$3.evaluate(MyBaseTest.java:96) at com.my.package.test.MyBaseTest$4.evaluate(MyBaseTest.java:109) at com.my.package.test.MyBaseTest$2.evaluate(MyBaseTest.java:77) @@ -626,7 +626,7 @@ def test_run_instrumentation_test_with_assumption_failure_test(self): at org.junit.runners.ParentRunner.access$000(ParentRunner.java:60) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:270) at org.junit.runners.ParentRunner.run(ParentRunner.java:370) - at android.support.test.runner.AndroidJUnit4.run(AndroidJUnit4.java:99) + at androidx.test.runner.AndroidJUnit4.run(AndroidJUnit4.java:99) at org.junit.runners.Suite.runChild(Suite.java:128) at org.junit.runners.Suite.runChild(Suite.java:27) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:292) @@ -645,7 +645,7 @@ def test_run_instrumentation_test_with_assumption_failure_test(self): at org.junit.runners.ParentRunner.run(ParentRunner.java:370) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at org.junit.runner.JUnitCore.run(JUnitCore.java:115) - at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:56) + at androidx.test.internal.runner.TestExecutor.execute(TestExecutor.java:56) at com.my.package.test.runner.BaseRunner.runTests(BaseRunner.java:344) at com.my.package.test.runner.BaseRunner.onStart(BaseRunner.java:330) at com.my.package.test.runner.BaseRunner.onStart(BaseRunner.java:253) @@ -827,9 +827,9 @@ def test_run_instrumentation_test_with_multiple_tests(self, mock_get_time): at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:59) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) - at android.support.test.internal.runner.junit4.statement.RunBefores.evaluate(RunBefores.java:80) - at android.support.test.internal.runner.junit4.statement.RunAfters.evaluate(RunAfters.java:61) - at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433) + at androidx.test.internal.runner.junit4.statement.RunBefores.evaluate(RunBefores.java:80) + at androidx.test.internal.runner.junit4.statement.RunAfters.evaluate(RunAfters.java:61) + at androidx.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433) at com.my.package.test.BaseTest$3.evaluate(BaseTest.java:96) at com.my.package.test.BaseTest$4.evaluate(BaseTest.java:109) at com.my.package.test.BaseTest$2.evaluate(BaseTest.java:77) @@ -846,7 +846,7 @@ def test_run_instrumentation_test_with_multiple_tests(self, mock_get_time): at org.junit.runners.ParentRunner.access$000(ParentRunner.java:60) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:270) at org.junit.runners.ParentRunner.run(ParentRunner.java:370) - at android.support.test.runner.AndroidJUnit4.run(AndroidJUnit4.java:99) + at androidx.test.runner.AndroidJUnit4.run(AndroidJUnit4.java:99) at org.junit.runners.Suite.runChild(Suite.java:128) at org.junit.runners.Suite.runChild(Suite.java:27) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:292) @@ -865,7 +865,7 @@ def test_run_instrumentation_test_with_multiple_tests(self, mock_get_time): at org.junit.runners.ParentRunner.run(ParentRunner.java:370) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at org.junit.runner.JUnitCore.run(JUnitCore.java:115) - at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:56) + at androidx.test.internal.runner.TestExecutor.execute(TestExecutor.java:56) at com.my.package.test.BaseRunner.runTests(BaseRunner.java:344) at com.my.package.test.BaseRunner.onStart(BaseRunner.java:330) at com.my.package.test.runner.MyRunner.onStart(MyRunner.java:253) @@ -880,9 +880,9 @@ def test_run_instrumentation_test_with_multiple_tests(self, mock_get_time): at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:59) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) - at android.support.test.internal.runner.junit4.statement.RunBefores.evaluate(RunBefores.java:80) - at android.support.test.internal.runner.junit4.statement.RunAfters.evaluate(RunAfters.java:61) - at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433) + at androidx.test.internal.runner.junit4.statement.RunBefores.evaluate(RunBefores.java:80) + at androidx.test.internal.runner.junit4.statement.RunAfters.evaluate(RunAfters.java:61) + at androidx.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433) at com.my.package.test.BaseTest$3.evaluate(BaseTest.java:96) at com.my.package.test.BaseTest$4.evaluate(BaseTest.java:109) at com.my.package.test.BaseTest$2.evaluate(BaseTest.java:77) @@ -899,7 +899,7 @@ def test_run_instrumentation_test_with_multiple_tests(self, mock_get_time): at org.junit.runners.ParentRunner.access$000(ParentRunner.java:60) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:270) at org.junit.runners.ParentRunner.run(ParentRunner.java:370) - at android.support.test.runner.AndroidJUnit4.run(AndroidJUnit4.java:99) + at androidx.test.runner.AndroidJUnit4.run(AndroidJUnit4.java:99) at org.junit.runners.Suite.runChild(Suite.java:128) at org.junit.runners.Suite.runChild(Suite.java:27) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:292) @@ -918,7 +918,7 @@ def test_run_instrumentation_test_with_multiple_tests(self, mock_get_time): at org.junit.runners.ParentRunner.run(ParentRunner.java:370) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at org.junit.runner.JUnitCore.run(JUnitCore.java:115) - at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:56) + at androidx.test.internal.runner.TestExecutor.execute(TestExecutor.java:56) at com.my.package.test.BaseRunner.runTests(BaseRunner.java:344) at com.my.package.test.BaseRunner.onStart(BaseRunner.java:330) at com.my.package.test.runner.MyRunner.onStart(MyRunner.java:253) @@ -945,9 +945,9 @@ def test_run_instrumentation_test_with_multiple_tests(self, mock_get_time): at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:59) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) - at android.support.test.internal.runner.junit4.statement.RunBefores.evaluate(RunBefores.java:80) - at android.support.test.internal.runner.junit4.statement.RunAfters.evaluate(RunAfters.java:61) - at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433) + at androidx.test.internal.runner.junit4.statement.RunBefores.evaluate(RunBefores.java:80) + at androidx.test.internal.runner.junit4.statement.RunAfters.evaluate(RunAfters.java:61) + at androidx.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433) at com.my.package.test.BaseTest$3.evaluate(BaseTest.java:96) at com.my.package.test.BaseTest$4.evaluate(BaseTest.java:109) at com.my.package.test.BaseTest$2.evaluate(BaseTest.java:77) @@ -964,7 +964,7 @@ def test_run_instrumentation_test_with_multiple_tests(self, mock_get_time): at org.junit.runners.ParentRunner.access$000(ParentRunner.java:60) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:270) at org.junit.runners.ParentRunner.run(ParentRunner.java:370) - at android.support.test.runner.AndroidJUnit4.run(AndroidJUnit4.java:99) + at androidx.test.runner.AndroidJUnit4.run(AndroidJUnit4.java:99) at org.junit.runners.Suite.runChild(Suite.java:128) at org.junit.runners.Suite.runChild(Suite.java:27) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:292) @@ -983,7 +983,7 @@ def test_run_instrumentation_test_with_multiple_tests(self, mock_get_time): at org.junit.runners.ParentRunner.run(ParentRunner.java:370) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at org.junit.runner.JUnitCore.run(JUnitCore.java:115) - at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:56) + at androidx.test.internal.runner.TestExecutor.execute(TestExecutor.java:56) at com.my.package.test.BaseRunner.runTests(BaseRunner.java:344) at com.my.package.test.BaseRunner.onStart(BaseRunner.java:330) at com.my.package.test.runner.MyRunner.onStart(MyRunner.java:253) @@ -1032,9 +1032,9 @@ def test_run_instrumentation_test_with_multiple_tests(self, mock_get_time): at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:59) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) - at android.support.test.internal.runner.junit4.statement.RunBefores.evaluate(RunBefores.java:80) - at android.support.test.internal.runner.junit4.statement.RunAfters.evaluate(RunAfters.java:61) - at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433) + at androidx.test.internal.runner.junit4.statement.RunBefores.evaluate(RunBefores.java:80) + at androidx.test.internal.runner.junit4.statement.RunAfters.evaluate(RunAfters.java:61) + at androidx.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433) at com.my.package.test.BaseTest$3.evaluate(BaseTest.java:96) at com.my.package.test.BaseTest$4.evaluate(BaseTest.java:109) at com.my.package.test.BaseTest$2.evaluate(BaseTest.java:77) @@ -1051,7 +1051,7 @@ def test_run_instrumentation_test_with_multiple_tests(self, mock_get_time): at org.junit.runners.ParentRunner.access$000(ParentRunner.java:60) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:270) at org.junit.runners.ParentRunner.run(ParentRunner.java:370) - at android.support.test.runner.AndroidJUnit4.run(AndroidJUnit4.java:99) + at androidx.test.runner.AndroidJUnit4.run(AndroidJUnit4.java:99) at org.junit.runners.Suite.runChild(Suite.java:128) at org.junit.runners.Suite.runChild(Suite.java:27) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:292) @@ -1070,7 +1070,7 @@ def test_run_instrumentation_test_with_multiple_tests(self, mock_get_time): at org.junit.runners.ParentRunner.run(ParentRunner.java:370) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at org.junit.runner.JUnitCore.run(JUnitCore.java:115) - at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:56) + at androidx.test.internal.runner.TestExecutor.execute(TestExecutor.java:56) at com.my.package.test.BaseRunner.runTests(BaseRunner.java:344) at com.my.package.test.BaseRunner.onStart(BaseRunner.java:330) at com.my.package.test.runner.MyRunner.onStart(MyRunner.java:253)