Beispiel #1
0
def GenerateSignatureCheckDescription(test_repository):
  """Generate the test description for the signature check."""
  LogGenerateDescription('android.tests.sigtest')
  package = tools.TestPackage('SignatureTest', 'android.tests.sigtest')
  package.AddAttribute('appNameSpace', 'android.tests.sigtest')
  package.AddAttribute('signatureCheck', 'true')
  package.AddAttribute('runner', '.InstrumentationRunner')
  package.AddTest('android.tests.sigtest.SignatureTest.signatureTest')
  description = open(os.path.join(test_repository, 'SignatureTest.xml'), 'w')
  package.WriteDescription(description)
  description.close()
Beispiel #2
0
def GenerateReferenceAppDescription(test_repository):
    """Generate the test description for the reference app tests."""
    LogGenerateDescription('android.apidemos.cts')
    package = tools.TestPackage('ApiDemosReferenceTest',
                                'android.apidemos.cts')
    package.AddAttribute('appNameSpace', 'android.apidemos.cts')
    package.AddAttribute('packageToTest', 'com.example.android.apis')
    package.AddAttribute('apkToTestName', 'ApiDemos')
    package.AddAttribute('runner', 'android.test.InstrumentationTestRunner')
    package.AddAttribute('referenceAppTest', 'true')
    package.AddTest(
        'android.apidemos.cts.ApiDemosTest.testNumberOfItemsInListView')
    description = open(
        os.path.join(test_repository, 'ApiDemosReferenceTest.xml'), 'w')
    package.WriteDescription(description)
    description.close()