def main(): args = ParseArgs() results = queries.GetFlakyOrFailingTests(args.sample_period, args.project) aggregated_results = results_module.AggregateResults(results) result_output.GenerateHtmlOutputFile(aggregated_results) print( 'If there are many instances of failed tests, that may be indicative ' 'of an issue that should be handled in some other way, e.g. reverting ' 'a bad CL.') input('\nBeginning of user input section - press any key to continue') expectations.IterateThroughResultsForUser(aggregated_results, args.group_by_tags) print( '\nGenerated expectations likely contain conflicting tags that need to ' 'be removed.')
def testBasic(self): """Basic functionality test.""" query_results = [ { 'name': ('gpu_tests.webgl_conformance_integration_test.' 'WebGLConformanceIntegrationTest.' 'conformance/textures/misc/video-rotation.html'), 'id': 'build-1111', 'typ_tags': ['win', 'nvidia'], }, { 'name': ('gpu_tests.webgl_conformance_integration_test.' 'WebGLConformanceIntegrationTest.' 'conformance/textures/misc/video-rotation.html'), 'id': 'build-2222', 'typ_tags': ['win', 'nvidia'], }, { 'name': ('gpu_tests.webgl_conformance_integration_test.' 'WebGLConformanceIntegrationTest.' 'conformance/textures/misc/video-rotation.html'), 'id': 'build-3333', 'typ_tags': ['win', 'amd'], }, { 'name': ('gpu_tests.webgl_conformance_integration_test.' 'WebGLConformanceIntegrationTest.' 'conformance/textures/misc/texture-npot-video.html'), 'id': 'build-4444', 'typ_tags': ['win', 'nvidia'], }, { 'name': ('gpu_tests.pixel_integration_test.PixelIntegrationTest.' 'Pixel_CSS3DBlueBox'), 'id': 'build-5555', 'typ_tags': ['win', 'nvidia'], }, ] expected_output = { 'webgl_conformance_integration_test': { 'conformance/textures/misc/video-rotation.html': { 'nvidia__win': { 'typ_tags': ['nvidia', 'win'], 'build_url_list': [ 'http://ci.chromium.org/b/1111', 'http://ci.chromium.org/b/2222', ], }, 'amd__win': { 'typ_tags': ['amd', 'win'], 'build_url_list': ['http://ci.chromium.org/b/3333'], }, }, 'conformance/textures/misc/texture-npot-video.html': { 'nvidia__win': { 'typ_tags': ['nvidia', 'win'], 'build_url_list': ['http://ci.chromium.org/b/4444'], }, }, }, 'pixel_integration_test': { 'Pixel_CSS3DBlueBox': { 'nvidia__win': { 'typ_tags': ['nvidia', 'win'], 'build_url_list': ['http://ci.chromium.org/b/5555'], }, }, }, } self.assertEqual(results.AggregateResults(query_results), expected_output)
def testWithFiltering(self): """Tests that results are properly filtered out.""" self._local_mock.return_value = { 'webgl_conformance_expectations.txt': GPU_EXPECTATION_FILE_CONTENTS, } query_results = [ # Expected to be removed. { 'name': ('gpu_tests.webgl_conformance_integration_test.' 'WebGLConformanceIntegrationTest.' 'conformance/textures/misc/video-rotation.html'), 'id': 'build-1111', 'typ_tags': ['win', 'nvidia'], }, # Expected to be removed. { 'name': ('gpu_tests.webgl_conformance_integration_test.' 'WebGLConformanceIntegrationTest.' 'conformance/textures/misc/video-rotation.html'), 'id': 'build-2222', 'typ_tags': ['win', 'nvidia'], }, { 'name': ('gpu_tests.webgl_conformance_integration_test.' 'WebGLConformanceIntegrationTest.' 'conformance/textures/misc/video-rotation.html'), 'id': 'build-3333', 'typ_tags': ['win', 'amd'], }, { 'name': ('gpu_tests.webgl_conformance_integration_test.' 'WebGLConformanceIntegrationTest.' 'conformance/textures/misc/texture-npot-video.html'), 'id': 'build-4444', 'typ_tags': ['win', 'nvidia'], }, { 'name': ('gpu_tests.pixel_integration_test.PixelIntegrationTest.' 'Pixel_CSS3DBlueBox'), 'id': 'build-5555', 'typ_tags': ['win', 'nvidia'], }, ] expected_output = { 'webgl_conformance_integration_test': { 'conformance/textures/misc/video-rotation.html': { ('amd', 'win'): ['http://ci.chromium.org/b/3333'], }, 'conformance/textures/misc/texture-npot-video.html': { ('nvidia', 'win'): ['http://ci.chromium.org/b/4444'], }, }, 'pixel_integration_test': { 'Pixel_CSS3DBlueBox': { ('nvidia', 'win'): ['http://ci.chromium.org/b/5555'], }, }, } self.assertEqual(results.AggregateResults(query_results), expected_output)