def GenerateTestPlans(self): """Generate default test plans.""" # TODO: Instead of hard-coding the plans here, use a configuration file, # such as test_defs.xml packages = [] descriptions = sorted(glob.glob(os.path.join(self.test_repository, '*.xml'))) for description in descriptions: doc = tools.XmlFile(description) packages.append(doc.GetAttr('TestPackage', 'appPackageName')) plan = tools.TestPlan(packages) plan.Exclude('android\.performance.*') self.__WritePlan(plan, 'CTS') self.__WritePlan(plan, 'CTS-TF') plan.Exclude(r'android\.tests\.sigtest') plan.Exclude(r'android\.core.*') self.__WritePlan(plan, 'Android') plan = tools.TestPlan(packages) plan.Include(r'android\.core\.tests.*') self.__WritePlan(plan, 'Java') plan = tools.TestPlan(packages) plan.Include(r'android\.core\.vm-tests-tf') self.__WritePlan(plan, 'VM-TF') plan = tools.TestPlan(packages) plan.Include(r'android\.tests\.sigtest') self.__WritePlan(plan, 'Signature') plan = tools.TestPlan(packages) plan.Include(r'android\.tests\.appsecurity') self.__WritePlan(plan, 'AppSecurity')
def GenerateTestPlans(self): """Generate default test plans.""" # TODO: Instead of hard-coding the plans here, use a configuration file, # such as test_defs.xml packages = [] descriptions = sorted(glob.glob(os.path.join(self.test_repository, '*.xml'))) for description in descriptions: doc = tools.XmlFile(description) packages.append(doc.GetAttr('TestPackage', 'appPackageName')) if not self.isCts: # PTS plan = tools.TestPlan(packages) plan.Include('.*') plan.Exclude(r'android\.tests\.sigtest') self.__WritePlan(plan, 'PTS') return plan = tools.TestPlan(packages) plan.Exclude('android\.performance.*') self.__WritePlan(plan, 'CTS') self.__WritePlan(plan, 'CTS-TF') plan.Exclude(r'android\.tests\.sigtest') plan.Exclude(r'android\.core.*') self.__WritePlan(plan, 'Android') plan = tools.TestPlan(packages) plan.Include(r'android\.core\.tests.*') self.__WritePlan(plan, 'Java') plan = tools.TestPlan(packages) plan.Include(r'android\.core\.vm-tests-tf') self.__WritePlan(plan, 'VM-TF') plan = tools.TestPlan(packages) plan.Include(r'android\.tests\.sigtest') self.__WritePlan(plan, 'Signature') plan = tools.TestPlan(packages) plan.Include(r'android\.tests\.appsecurity') self.__WritePlan(plan, 'AppSecurity') plan = tools.TestPlan(packages) plan.Include(r'mediatek.*') self.__WritePlan(plan, 'MTK') # hard-coded white list for PDK plan plan.Exclude('.*') plan.Include('android\.bluetooth') plan.Include('android\.graphics.*') plan.Include('android\.hardware') plan.Include('android\.media.*') plan.Include('android\.net') plan.Include('android\.opengl.*') plan.Include('android\.renderscript') plan.Include('android\.telephony') plan.Include('android\.nativemedia.*') self.__WritePlan(plan, 'PDK')
def GenerateTestPlans(self): """Generate default test plans.""" # TODO: Instead of hard-coding the plans here, use a configuration file, # such as test_defs.xml packages = [] descriptions = sorted( glob.glob(os.path.join(self.test_repository, '*.xml'))) for description in descriptions: doc = tools.XmlFile(description) packages.append(doc.GetAttr('TestPackage', 'appPackageName')) # sort the list to give the same sequence based on name packages.sort() plan = tools.TestPlan(packages) plan.Exclude('android\.performance.*') self.__WritePlan(plan, 'CTS') self.__WritePlan(plan, 'CTS-TF') plan = tools.TestPlan(packages) plan.Exclude('android\.performance.*') plan.Exclude('android\.media\.cts\.StreamingMediaPlayerTest.*') # Test plan to not include media streaming tests self.__WritePlan(plan, 'CTS-No-Media-Stream') plan = tools.TestPlan(packages) plan.Exclude('android\.performance.*') self.__WritePlan(plan, 'SDK') plan.Exclude(r'android\.signature') plan.Exclude(r'android\.core.*') self.__WritePlan(plan, 'Android') plan = tools.TestPlan(packages) plan.Include(r'android\.core\.tests.*') plan.Exclude(r'android\.core\.tests\.libcore.\package.\harmony*') self.__WritePlan(plan, 'Java') # TODO: remove this once the tests are fixed and merged into Java plan above. plan = tools.TestPlan(packages) plan.Include(r'android\.core\.tests\.libcore.\package.\harmony*') self.__WritePlan(plan, 'Harmony') plan = tools.TestPlan(packages) plan.Include(r'android\.core\.vm-tests-tf') self.__WritePlan(plan, 'VM-TF') plan = tools.TestPlan(packages) plan.Include(r'android\.tests\.appsecurity') self.__WritePlan(plan, 'AppSecurity') # hard-coded white list for PDK plan plan.Exclude('.*') plan.Include('android\.aadb') plan.Include('android\.bluetooth') plan.Include('android\.graphics.*') plan.Include('android\.hardware') plan.Include('android\.media') plan.Exclude('android\.mediastress') plan.Include('android\.net') plan.Include('android\.opengl.*') plan.Include('android\.renderscript') plan.Include('android\.telephony') plan.Include('android\.nativemedia.*') plan.Include('com\.android\.cts\..*' ) #TODO(stuartscott): Should PDK have all these? self.__WritePlan(plan, 'PDK') temporarily_known_failure_tests = BuildCtsTemporarilyKnownFailureList( ) flaky_tests = BuildCtsFlakyTestList() releasekey_tests = BuildListForReleaseBuildTest() # CTS Stable plan plan = tools.TestPlan(packages) plan.Exclude(r'com\.android\.cts\.browserbench') for package, test_list in flaky_tests.iteritems(): plan.ExcludeTests(package, test_list) for package, test_list in releasekey_tests.iteritems(): plan.ExcludeTests(package, test_list) self.__WritePlan(plan, 'CTS-stable') # CTS Flaky plan - list of tests known to be flaky in lab environment plan = tools.TestPlan(packages) plan.Exclude('.*') plan.Include(r'com\.android\.cts\.browserbench') for package, test_list in flaky_tests.iteritems(): plan.Include(package + '$') plan.IncludeTests(package, test_list) self.__WritePlan(plan, 'CTS-flaky') small_tests = BuildAospSmallSizeTestList() medium_tests = BuildAospMediumSizeTestList() new_test_packages = BuildCtsVettedNewPackagesList() # CTS - sub plan for public, small size tests plan = tools.TestPlan(packages) plan.Exclude('.*') for package, test_list in small_tests.iteritems(): plan.Include(package + '$') plan.Exclude(r'com\.android\.cts\.browserbench') for package, test_list in flaky_tests.iteritems(): plan.ExcludeTests(package, test_list) for package, test_list in releasekey_tests.iteritems(): plan.ExcludeTests(package, test_list) self.__WritePlan(plan, 'CTS-kitkat-small') self.__WritePlan(plan, 'CTS-public-small') # CTS - sub plan for public, medium size tests plan = tools.TestPlan(packages) plan.Exclude('.*') for package, test_list in medium_tests.iteritems(): plan.Include(package + '$') plan.Exclude(r'com\.android\.cts\.browserbench') for package, test_list in flaky_tests.iteritems(): plan.ExcludeTests(package, test_list) for package, test_list in releasekey_tests.iteritems(): plan.ExcludeTests(package, test_list) self.__WritePlan(plan, 'CTS-kitkat-medium') self.__WritePlan(plan, 'CTS-public-medium') # CTS - sub plan for hardware tests which is public, large plan = tools.TestPlan(packages) plan.Exclude('.*') plan.Include(r'android\.hardware$') plan.Exclude(r'com\.android\.cts\.browserbench') for package, test_list in flaky_tests.iteritems(): plan.ExcludeTests(package, test_list) for package, test_list in releasekey_tests.iteritems(): plan.ExcludeTests(package, test_list) self.__WritePlan(plan, 'CTS-hardware') # CTS - sub plan for camera tests which is public, large plan = tools.TestPlan(packages) plan.Exclude('.*') plan.Include(r'android\.camera$') misc_camera_tests = BuildCtsMiscCameraList() for package, test_list in misc_camera_tests.iteritems(): plan.Include(package + '$') plan.IncludeTests(package, test_list) for package, test_list in flaky_tests.iteritems(): plan.ExcludeTests(package, test_list) for package, test_list in releasekey_tests.iteritems(): plan.ExcludeTests(package, test_list) self.__WritePlan(plan, 'CTS-camera') # CTS - sub plan for media tests which is public, large plan = tools.TestPlan(packages) plan.Exclude('.*') plan.Include(r'android\.media$') plan.Include(r'android\.view$') plan.Exclude(r'com\.android\.cts\.browserbench') for package, test_list in flaky_tests.iteritems(): plan.ExcludeTests(package, test_list) for package, test_list in releasekey_tests.iteritems(): plan.ExcludeTests(package, test_list) self.__WritePlan(plan, 'CTS-media') # CTS - sub plan for mediastress tests which is public, large plan = tools.TestPlan(packages) plan.Exclude('.*') plan.Include(r'android\.mediastress$') plan.Exclude(r'com\.android\.cts\.browserbench') for package, test_list in flaky_tests.iteritems(): plan.ExcludeTests(package, test_list) for package, test_list in releasekey_tests.iteritems(): plan.ExcludeTests(package, test_list) self.__WritePlan(plan, 'CTS-mediastress') # CTS - sub plan for new tests that is vetted for L launch plan = tools.TestPlan(packages) plan.Exclude('.*') for package, test_list in new_test_packages.iteritems(): plan.Include(package + '$') plan.Exclude(r'com\.android\.cts\.browserbench') for package, test_list in flaky_tests.iteritems(): plan.ExcludeTests(package, test_list) for package, test_list in releasekey_tests.iteritems(): plan.ExcludeTests(package, test_list) self.__WritePlan(plan, 'CTS-l-tests') # CTS - sub plan for tests in drawelement packages plan = tools.TestPlan(packages) plan.Exclude('.*') plan.Include(r'com\.drawelements\.') self.__WritePlan(plan, 'CTS-DEQP') # CTS - sub plan for new test packages added for staging plan = tools.TestPlan(packages) for package, test_list in small_tests.iteritems(): plan.Exclude(package + '$') for package, test_list in medium_tests.iteritems(): plan.Exclude(package + '$') for package, tests_list in new_test_packages.iteritems(): plan.Exclude(package + '$') plan.Exclude(r'com\.drawelements\.') plan.Exclude(r'android\.hardware$') plan.Exclude(r'android\.media$') plan.Exclude(r'android\.view$') plan.Exclude(r'android\.mediastress$') plan.Exclude(r'com\.android\.cts\.browserbench') for package, test_list in flaky_tests.iteritems(): plan.ExcludeTests(package, test_list) for package, test_list in releasekey_tests.iteritems(): plan.ExcludeTests(package, test_list) self.__WritePlan(plan, 'CTS-m-tests') # CTS - sub plan for new test packages added for staging plan = tools.TestPlan(packages) plan.Exclude('.*') for package, test_list in temporarily_known_failure_tests.iteritems(): plan.Include(package + '$') plan.IncludeTests(package, test_list) self.__WritePlan(plan, 'CTS-staging') plan = tools.TestPlan(packages) plan.Exclude('.*') self.__WritePlan(plan, 'CTS-webview') # CTS - sub plan for Security plan = tools.TestPlan(packages) plan.Exclude('.*') plan.Include(r'android\.security$') plan.Include('android\.host\.jdwpsecurity$') self.__WritePlan(plan, 'Security')
def GenerateTestPlans(self): """Generate default test plans.""" # TODO: Instead of hard-coding the plans here, use a configuration file, # such as test_defs.xml packages = [] descriptions = sorted( glob.glob(os.path.join(self.test_repository, '*.xml'))) for description in descriptions: doc = tools.XmlFile(description) packages.append(doc.GetAttr('TestPackage', 'appPackageName')) # sort the list to give the same sequence based on name packages.sort() plan = tools.TestPlan(packages) plan.Exclude('android\.performance.*') self.__WritePlan(plan, 'CTS') self.__WritePlan(plan, 'CTS-TF') plan = tools.TestPlan(packages) plan.Exclude('android\.performance.*') plan.Exclude('android\.media\.cts\.StreamingMediaPlayerTest.*') # Test plan to not include media streaming tests self.__WritePlan(plan, 'CTS-No-Media-Stream') plan = tools.TestPlan(packages) plan.Exclude('android\.performance.*') self.__WritePlan(plan, 'SDK') plan.Exclude(r'android\.tests\.sigtest') plan.Exclude(r'android\.core.*') self.__WritePlan(plan, 'Android') plan = tools.TestPlan(packages) plan.Include(r'android\.core\.tests.*') self.__WritePlan(plan, 'Java') plan = tools.TestPlan(packages) plan.Include(r'android\.core\.vm-tests-tf') self.__WritePlan(plan, 'VM-TF') plan = tools.TestPlan(packages) plan.Include(r'android\.tests\.sigtest') self.__WritePlan(plan, 'Signature') plan = tools.TestPlan(packages) plan.Include(r'android\.tests\.appsecurity') self.__WritePlan(plan, 'AppSecurity') # hard-coded white list for PDK plan plan.Exclude('.*') plan.Include('android\.aadb') plan.Include('android\.bluetooth') plan.Include('android\.graphics.*') plan.Include('android\.hardware') plan.Include('android\.media') plan.Exclude('android\.mediastress') plan.Include('android\.net') plan.Include('android\.opengl.*') plan.Include('android\.renderscript') plan.Include('android\.telephony') plan.Include('android\.nativemedia.*') self.__WritePlan(plan, 'PDK')
def GenerateTestPlans(self): """Generate default test plans.""" # TODO: Instead of hard-coding the plans here, use a configuration file, # such as test_defs.xml packages = [] descriptions = sorted( glob.glob(os.path.join(self.test_repository, '*.xml'))) for description in descriptions: doc = tools.XmlFile(description) packages.append(doc.GetAttr('TestPackage', 'appPackageName')) # sort the list to give the same sequence based on name packages.sort() plan = tools.TestPlan(packages) plan.Exclude('android\.performance.*') self.__WritePlan(plan, 'CTS') self.__WritePlan(plan, 'CTS-TF') plan = tools.TestPlan(packages) plan.Exclude('android\.performance.*') plan.Exclude('android\.media\.cts\.StreamingMediaPlayerTest.*') # Test plan to not include media streaming tests self.__WritePlan(plan, 'CTS-No-Media-Stream') plan = tools.TestPlan(packages) plan.Exclude('android\.performance.*') self.__WritePlan(plan, 'SDK') plan.Exclude(r'android\.tests\.sigtest') plan.Exclude(r'android\.core.*') self.__WritePlan(plan, 'Android') plan = tools.TestPlan(packages) plan.Include(r'android\.core\.tests.*') self.__WritePlan(plan, 'Java') plan = tools.TestPlan(packages) plan.Include(r'android\.core\.vm-tests-tf') self.__WritePlan(plan, 'VM-TF') plan = tools.TestPlan(packages) plan.Include(r'android\.tests\.sigtest') self.__WritePlan(plan, 'Signature') plan = tools.TestPlan(packages) plan.Include(r'android\.tests\.appsecurity') self.__WritePlan(plan, 'AppSecurity') # hard-coded white list for PDK plan plan.Exclude('.*') plan.Include('android\.aadb') plan.Include('android\.bluetooth') plan.Include('android\.graphics.*') plan.Include('android\.hardware') plan.Include('android\.media') plan.Exclude('android\.mediastress') plan.Include('android\.net') plan.Include('android\.opengl.*') plan.Include('android\.renderscript') plan.Include('android\.telephony') plan.Include('android\.nativemedia.*') plan.Include('com\.android\.cts\..*' ) #TODO(stuartscott): Should PDK have all these? #TODO(stuartscott): Maybe move away from com.android.* to android.* - less typing self.__WritePlan(plan, 'PDK') #dirty hack to copy over pre-populated CTS plans - flaky vs stable - to streamline autoCTS shutil.copyfile( os.path.join(self.definedplans_repository, 'CTS-flaky.xml'), os.path.join(self.plan_repository, 'CTS-flaky.xml')) shutil.copyfile( os.path.join(self.definedplans_repository, 'CTS-stable.xml'), os.path.join(self.plan_repository, 'CTS-stable.xml'))