Merge "Default test to AndroidJUnitTest for auto-generated test config." am: ce1fa25d1b

am: d91129eea9

Change-Id: Ib0e817e8d403ea130516dbc94201fd4a899c327f
This commit is contained in:
Dan Shi 2018-02-26 23:18:57 +00:00 committed by android-build-merger
commit 6dbd9e3df9
2 changed files with 4 additions and 3 deletions

View File

@ -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()

View File

@ -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)