summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dan Shi <dshi@google.com> 2018-02-21 11:31:06 -0800
committer Dan Shi <dshi@google.com> 2018-02-21 11:31:06 -0800
commit96068b77edeb9affa0e319590aa5a3176f230417 (patch)
tree037d87af583a338cca25e493151cd923e3c4173d
parent504bd79e86fa1eb3fad3fe53e74a493841e00575 (diff)
Default test to AndroidJUnitTest for auto-generated test config.
All new instrumentation tests shall use AndroidJUnitRunner, thus default test class to AndroidJUnitTest. Bug: 73679956 Test: unittest Change-Id: I52df4d01b8459a4a6e5c2cbe15973dab079fb136
-rwxr-xr-xtools/auto_gen_test_config.py5
-rw-r--r--tools/auto_gen_test_config_test.py2
2 files changed, 4 insertions, 3 deletions
diff --git a/tools/auto_gen_test_config.py b/tools/auto_gen_test_config.py
index da4443c432..c7c5bdc611 100755
--- a/tools/auto_gen_test_config.py
+++ b/tools/auto_gen_test_config.py
@@ -70,8 +70,9 @@ def main(argv):
label = module
runner = instrumentation.attributes[ATTRIBUTE_RUNNER].value
package = manifest.attributes[ATTRIBUTE_PACKAGE].value
- test_type = ('AndroidJUnitTest' if runner.endswith('.AndroidJUnitRunner')
- else 'InstrumentationTest')
+ test_type = ('InstrumentationTest'
+ if runner.endswith('.InstrumentationTestRunner')
+ else 'AndroidJUnitTest')
with open(instrumentation_test_config_template) as template:
config = template.read()
diff --git a/tools/auto_gen_test_config_test.py b/tools/auto_gen_test_config_test.py
index e70eff88ac..e68c27fdd2 100644
--- a/tools/auto_gen_test_config_test.py
+++ b/tools/auto_gen_test_config_test.py
@@ -155,7 +155,7 @@ class AutoGenTestConfigUnittests(unittest.TestCase):
self.assertEqual(config_file.read(), EXPECTED_JUNIT_TEST_CONFIG)
def testCreateInstrumentationTestConfig(self):
- """Test creating test config for AndroidJUnitTest.
+ """Test creating test config for InstrumentationTest.
"""
with open(self.manifest_file, 'w') as f:
f.write(MANIFEST_INSTRUMENTATION_TEST)