Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: content/test/gpu/generate_buildbot_json.py

Issue 2632603002: Add support for ASAN-specific test expectations to WebGL tests. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/test/gpu/gpu_tests/gpu_test_expectations.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2016 The Chromium Authors. All rights reserved. 2 # Copyright 2016 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Script to generate chromium.gpu.json and chromium.gpu.fyi.json in 6 """Script to generate chromium.gpu.json and chromium.gpu.fyi.json in
7 the src/testing/buildbot directory. Maintaining these files by hand is 7 the src/testing/buildbot directory. Maintaining these files by hand is
8 too unwieldy. 8 too unwieldy.
9 """ 9 """
10 10
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 }, 437 },
438 { 438 {
439 'gpu': '1002:6821', 439 'gpu': '1002:6821',
440 'hidpi': '1', 440 'hidpi': '1',
441 'os': 'Mac' 441 'os': 'Mac'
442 }, 442 },
443 ], 443 ],
444 'build_config': 'Release', 444 'build_config': 'Release',
445 'swarming': True, 445 'swarming': True,
446 'os_type': 'mac', 446 'os_type': 'mac',
447 'is_asan': True,
447 }, 448 },
448 'Linux Release (NVIDIA)': { 449 'Linux Release (NVIDIA)': {
449 'swarming_dimensions': [ 450 'swarming_dimensions': [
450 { 451 {
451 'gpu': '10de:104a', 452 'gpu': '10de:104a',
452 'os': 'Linux' 453 'os': 'Linux'
453 }, 454 },
454 ], 455 ],
455 'build_config': 'Release', 456 'build_config': 'Release',
456 'swarming': True, 457 'swarming': True,
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 'allow_on_android': True, 1245 'allow_on_android': True,
1245 }, 1246 },
1246 ], 1247 ],
1247 }, 1248 },
1248 'webgl_conformance': { 1249 'webgl_conformance': {
1249 'tester_configs': [ 1250 'tester_configs': [
1250 { 1251 {
1251 'allow_on_android': True, 1252 'allow_on_android': True,
1252 }, 1253 },
1253 ], 1254 ],
1255 'asan_args': ['--is-asan'],
1254 }, 1256 },
1255 'webgl_conformance_d3d9_tests': { 1257 'webgl_conformance_d3d9_tests': {
1256 'tester_configs': [ 1258 'tester_configs': [
1257 { 1259 {
1258 'fyi_only': True, 1260 'fyi_only': True,
1259 'os_types': ['win'], 1261 'os_types': ['win'],
1260 'run_on_optional': True, 1262 'run_on_optional': True,
1261 } 1263 }
1262 ], 1264 ],
1263 'target_name': 'webgl_conformance', 1265 'target_name': 'webgl_conformance',
1264 'extra_browser_args': [ 1266 'extra_browser_args': [
1265 '--use-angle=d3d9', 1267 '--use-angle=d3d9',
1266 ], 1268 ],
1269 'asan_args': ['--is-asan'],
1267 }, 1270 },
1268 'webgl_conformance_gl_tests': { 1271 'webgl_conformance_gl_tests': {
1269 'tester_configs': [ 1272 'tester_configs': [
1270 { 1273 {
1271 'fyi_only': True, 1274 'fyi_only': True,
1272 'os_types': ['win'], 1275 'os_types': ['win'],
1273 'run_on_optional': True, 1276 'run_on_optional': True,
1274 } 1277 }
1275 ], 1278 ],
1276 'disabled_tester_configs': [ 1279 'disabled_tester_configs': [
(...skipping 21 matching lines...) Expand all
1298 'gpu': '8086:0412', 1301 'gpu': '8086:0412',
1299 'os': 'Windows-2008ServerR2-SP1' 1302 'os': 'Windows-2008ServerR2-SP1'
1300 }, 1303 },
1301 ], 1304 ],
1302 }, 1305 },
1303 ], 1306 ],
1304 'target_name': 'webgl_conformance', 1307 'target_name': 'webgl_conformance',
1305 'extra_browser_args': [ 1308 'extra_browser_args': [
1306 '--use-angle=gl', 1309 '--use-angle=gl',
1307 ], 1310 ],
1311 'asan_args': ['--is-asan'],
1308 }, 1312 },
1309 'webgl_conformance_angle_tests': { 1313 'webgl_conformance_angle_tests': {
1310 'tester_configs': [ 1314 'tester_configs': [
1311 { 1315 {
1312 'fyi_only': True, 1316 'fyi_only': True,
1313 'os_types': ['linux'], 1317 'os_types': ['linux'],
1314 'run_on_optional': True, 1318 'run_on_optional': True,
1315 } 1319 }
1316 ], 1320 ],
1317 'target_name': 'webgl_conformance', 1321 'target_name': 'webgl_conformance',
1318 'extra_browser_args': [ 1322 'extra_browser_args': [
1319 '--use-gl=angle', 1323 '--use-gl=angle',
1320 ], 1324 ],
1325 'asan_args': ['--is-asan'],
1321 }, 1326 },
1322 'webgl_conformance_d3d11_passthrough': { 1327 'webgl_conformance_d3d11_passthrough': {
1323 'tester_configs': [ 1328 'tester_configs': [
1324 { 1329 {
1325 'fyi_only': True, 1330 'fyi_only': True,
1326 'os_types': ['win'], 1331 'os_types': ['win'],
1327 'run_on_optional': True, 1332 'run_on_optional': True,
1328 } 1333 }
1329 ], 1334 ],
1330 'target_name': 'webgl_conformance', 1335 'target_name': 'webgl_conformance',
1331 'extra_browser_args': [ 1336 'extra_browser_args': [
1332 '--use-angle=d3d11', 1337 '--use-angle=d3d11',
1333 '--use-passthrough-cmd-decoder', 1338 '--use-passthrough-cmd-decoder',
1334 ], 1339 ],
1340 'asan_args': ['--is-asan'],
1335 }, 1341 },
1336 'webgl2_conformance_tests': { 1342 'webgl2_conformance_tests': {
1337 'tester_configs': [ 1343 'tester_configs': [
1338 { 1344 {
1339 # The WebGL 2.0 conformance tests take over an hour to run on 1345 # The WebGL 2.0 conformance tests take over an hour to run on
1340 # the Debug bots, which is too long. 1346 # the Debug bots, which is too long.
1341 'build_configs': ['Release', 'Release_x64'], 1347 'build_configs': ['Release', 'Release_x64'],
1342 'fyi_only': True, 1348 'fyi_only': True,
1343 'run_on_optional': True, 1349 'run_on_optional': True,
1344 }, 1350 },
1345 ], 1351 ],
1346 'disabled_tester_configs': [ 1352 'disabled_tester_configs': [
1347 { 1353 {
1348 'names': [ 1354 'names': [
1349 # http://crbug.com/599451: this test is currently too slow 1355 # http://crbug.com/599451: this test is currently too slow
1350 # to run on x64 in Debug mode. Need to shard the tests. 1356 # to run on x64 in Debug mode. Need to shard the tests.
1351 'Win7 x64 Debug (NVIDIA)', 1357 'Win7 x64 Debug (NVIDIA)',
1352 ], 1358 ],
1353 }, 1359 },
1354 ], 1360 ],
1355 'target_name': 'webgl_conformance', 1361 'target_name': 'webgl_conformance',
1356 'args': [ 1362 'args': [
1357 '--webgl-conformance-version=2.0.1', 1363 '--webgl-conformance-version=2.0.1',
1358 # The current working directory when run via isolate is 1364 # The current working directory when run via isolate is
1359 # out/Debug or out/Release. Reference this file relatively to 1365 # out/Debug or out/Release. Reference this file relatively to
1360 # it. 1366 # it.
1361 '--read-abbreviated-json-results-from=' + \ 1367 '--read-abbreviated-json-results-from=' + \
1362 '../../content/test/data/gpu/webgl2_conformance_tests_output.json', 1368 '../../content/test/data/gpu/webgl2_conformance_tests_output.json',
1363 ], 1369 ],
1370 'asan_args': ['--is-asan'],
1364 'swarming': { 1371 'swarming': {
1365 # These tests currently take about an hour and fifteen minutes 1372 # These tests currently take about an hour and fifteen minutes
1366 # to run. Split them into roughly 5-minute shards. 1373 # to run. Split them into roughly 5-minute shards.
1367 'shards': 15, 1374 'shards': 15,
1368 }, 1375 },
1369 }, 1376 },
1370 'webgl2_conformance_angle_tests': { 1377 'webgl2_conformance_angle_tests': {
1371 'tester_configs': [ 1378 'tester_configs': [
1372 { 1379 {
1373 # The WebGL 2.0 conformance tests take over an hour to run on 1380 # The WebGL 2.0 conformance tests take over an hour to run on
(...skipping 23 matching lines...) Expand all
1397 '--use-gl=angle', 1404 '--use-gl=angle',
1398 ], 1405 ],
1399 'args': [ 1406 'args': [
1400 '--webgl-conformance-version=2.0.1', 1407 '--webgl-conformance-version=2.0.1',
1401 # The current working directory when run via isolate is 1408 # The current working directory when run via isolate is
1402 # out/Debug or out/Release. Reference this file relatively to 1409 # out/Debug or out/Release. Reference this file relatively to
1403 # it. 1410 # it.
1404 '--read-abbreviated-json-results-from=' + \ 1411 '--read-abbreviated-json-results-from=' + \
1405 '../../content/test/data/gpu/webgl2_conformance_tests_output.json', 1412 '../../content/test/data/gpu/webgl2_conformance_tests_output.json',
1406 ], 1413 ],
1414 'asan_args': ['--is-asan'],
1407 'swarming': { 1415 'swarming': {
1408 # These tests currently take about an hour and fifteen minutes 1416 # These tests currently take about an hour and fifteen minutes
1409 # to run. Split them into roughly 5-minute shards. 1417 # to run. Split them into roughly 5-minute shards.
1410 'shards': 15, 1418 'shards': 15,
1411 }, 1419 },
1412 }, 1420 },
1413 } 1421 }
1414 1422
1415 # These isolated tests don't use telemetry. They need to be placed in the 1423 # These isolated tests don't use telemetry. They need to be placed in the
1416 # isolated_scripts section of the generated json. 1424 # isolated_scripts section of the generated json.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1450 def matches_swarming_dimensions(tester_config, dimension_sets): 1458 def matches_swarming_dimensions(tester_config, dimension_sets):
1451 for dimensions in dimension_sets: 1459 for dimensions in dimension_sets:
1452 for cur_dims in tester_config['swarming_dimensions']: 1460 for cur_dims in tester_config['swarming_dimensions']:
1453 if set(dimensions.items()).issubset(cur_dims.items()): 1461 if set(dimensions.items()).issubset(cur_dims.items()):
1454 return True 1462 return True
1455 return False 1463 return False
1456 1464
1457 def is_android(tester_config): 1465 def is_android(tester_config):
1458 return tester_config['os_type'] == 'android' 1466 return tester_config['os_type'] == 'android'
1459 1467
1468 def is_asan(tester_config):
1469 return tester_config.get('is_asan', False)
1470
1460 def tester_config_matches_tester(tester_name, tester_config, tc, is_fyi, 1471 def tester_config_matches_tester(tester_name, tester_config, tc, is_fyi,
1461 check_waterfall): 1472 check_waterfall):
1462 if check_waterfall: 1473 if check_waterfall:
1463 if tc.get('fyi_only', False) and not is_fyi: 1474 if tc.get('fyi_only', False) and not is_fyi:
1464 return False 1475 return False
1465 # Handle the optional tryservers with the 'run_on_optional' flag. 1476 # Handle the optional tryservers with the 'run_on_optional' flag.
1466 # Only a subset of the tests run on these tryservers. 1477 # Only a subset of the tests run on these tryservers.
1467 if tester_name.startswith('Optional') and not tc.get( 1478 if tester_name.startswith('Optional') and not tc.get(
1468 'run_on_optional', False): 1479 'run_on_optional', False):
1469 return False 1480 return False
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1620 if extra_browser_args_string != "": 1631 if extra_browser_args_string != "":
1621 test_args.append('--extra-browser-args=' + extra_browser_args_string) 1632 test_args.append('--extra-browser-args=' + extra_browser_args_string)
1622 if 'args' in test_config: 1633 if 'args' in test_config:
1623 test_args.extend(substitute_args(tester_config, test_config['args'])) 1634 test_args.extend(substitute_args(tester_config, test_config['args']))
1624 if 'desktop_args' in test_config and not is_android(tester_config): 1635 if 'desktop_args' in test_config and not is_android(tester_config):
1625 test_args.extend(substitute_args(tester_config, 1636 test_args.extend(substitute_args(tester_config,
1626 test_config['desktop_args'])) 1637 test_config['desktop_args']))
1627 if 'android_args' in test_config and is_android(tester_config): 1638 if 'android_args' in test_config and is_android(tester_config):
1628 test_args.extend(substitute_args(tester_config, 1639 test_args.extend(substitute_args(tester_config,
1629 test_config['android_args'])) 1640 test_config['android_args']))
1641 if 'asan_args' in test_config and is_asan(tester_config):
1642 test_args.extend(substitute_args(tester_config,
1643 test_config['asan_args']))
1630 # The step name must end in 'test' or 'tests' in order for the 1644 # The step name must end in 'test' or 'tests' in order for the
1631 # results to automatically show up on the flakiness dashboard. 1645 # results to automatically show up on the flakiness dashboard.
1632 # (At least, this was true some time ago.) Continue to use this 1646 # (At least, this was true some time ago.) Continue to use this
1633 # naming convention for the time being to minimize changes. 1647 # naming convention for the time being to minimize changes.
1634 step_name = test 1648 step_name = test
1635 if not (step_name.endswith('test') or step_name.endswith('tests')): 1649 if not (step_name.endswith('test') or step_name.endswith('tests')):
1636 step_name = '%s_tests' % step_name 1650 step_name = '%s_tests' % step_name
1637 # Prepend GPU-specific flags. 1651 # Prepend GPU-specific flags.
1638 swarming = { 1652 swarming = {
1639 # Always say this is true regardless of whether the tester 1653 # Always say this is true regardless of whether the tester
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1719 json.dump(tests, fp, indent=2, separators=(',', ': '), sort_keys=True) 1733 json.dump(tests, fp, indent=2, separators=(',', ': '), sort_keys=True)
1720 fp.write('\n') 1734 fp.write('\n')
1721 1735
1722 def main(): 1736 def main():
1723 generate_all_tests(FYI_WATERFALL, True) 1737 generate_all_tests(FYI_WATERFALL, True)
1724 generate_all_tests(WATERFALL, False) 1738 generate_all_tests(WATERFALL, False)
1725 return 0 1739 return 0
1726 1740
1727 if __name__ == "__main__": 1741 if __name__ == "__main__":
1728 sys.exit(main()) 1742 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | content/test/gpu/gpu_tests/gpu_test_expectations.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698