Merge "Default test to AndroidJUnitTest for auto-generated test config." am: ce1fa25d1b
am: d91129eea9
am: 6dbd9e3df9
Change-Id: I84ee22fa20b08fb3db27d5e5d0e03f097a11463f
This commit is contained in:
commit
9801d9b7b2
|
@ -70,8 +70,9 @@ def main(argv):
|
||||||
label = module
|
label = module
|
||||||
runner = instrumentation.attributes[ATTRIBUTE_RUNNER].value
|
runner = instrumentation.attributes[ATTRIBUTE_RUNNER].value
|
||||||
package = manifest.attributes[ATTRIBUTE_PACKAGE].value
|
package = manifest.attributes[ATTRIBUTE_PACKAGE].value
|
||||||
test_type = ('AndroidJUnitTest' if runner.endswith('.AndroidJUnitRunner')
|
test_type = ('InstrumentationTest'
|
||||||
else 'InstrumentationTest')
|
if runner.endswith('.InstrumentationTestRunner')
|
||||||
|
else 'AndroidJUnitTest')
|
||||||
|
|
||||||
with open(instrumentation_test_config_template) as template:
|
with open(instrumentation_test_config_template) as template:
|
||||||
config = template.read()
|
config = template.read()
|
||||||
|
|
|
@ -155,7 +155,7 @@ class AutoGenTestConfigUnittests(unittest.TestCase):
|
||||||
self.assertEqual(config_file.read(), EXPECTED_JUNIT_TEST_CONFIG)
|
self.assertEqual(config_file.read(), EXPECTED_JUNIT_TEST_CONFIG)
|
||||||
|
|
||||||
def testCreateInstrumentationTestConfig(self):
|
def testCreateInstrumentationTestConfig(self):
|
||||||
"""Test creating test config for AndroidJUnitTest.
|
"""Test creating test config for InstrumentationTest.
|
||||||
"""
|
"""
|
||||||
with open(self.manifest_file, 'w') as f:
|
with open(self.manifest_file, 'w') as f:
|
||||||
f.write(MANIFEST_INSTRUMENTATION_TEST)
|
f.write(MANIFEST_INSTRUMENTATION_TEST)
|
||||||
|
|
Loading…
Reference in New Issue