OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
6 | 6 |
7 import imp | 7 import imp |
8 import os | 8 import os |
9 import re | 9 import re |
10 import shutil | 10 import shutil |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 shutil.copy(dart_controller, test_controller) | 295 shutil.copy(dart_controller, test_controller) |
296 else: | 296 else: |
297 print "No unittest to patch, do you even have tests" | 297 print "No unittest to patch, do you even have tests" |
298 | 298 |
299 JS_RUNTIMES = { | 299 JS_RUNTIMES = { |
300 'windows': ['ff', 'chrome', 'ie10'], | 300 'windows': ['ff', 'chrome', 'ie10'], |
301 'linux': ['d8', 'jsshell', 'ff', 'chrome'], | 301 'linux': ['d8', 'jsshell', 'ff', 'chrome'], |
302 'mac': ['safari'], | 302 'mac': ['safari'], |
303 } | 303 } |
304 | 304 |
305 def RunPackageTesting(bot_info, package_path): | 305 def RunPackageTesting(bot_info, package_path, folder='test'): |
306 package_root = os.path.join(package_path, 'packages') | 306 package_name = os.path.basename(os.path.dirname(package_path)) |
| 307 package_root = os.path.join(package_path, folder, 'packages') |
307 standard_args = ['--suite-dir=%s' % package_path, | 308 standard_args = ['--suite-dir=%s' % package_path, |
308 '--use-sdk', '--report', '--progress=buildbot', | 309 '--use-sdk', '--report', '--progress=buildbot', |
309 '--clear_browser_cache', | 310 '--clear_browser_cache', |
310 '--package-root=%s' % package_root, | 311 '--package-root=%s' % package_root, |
311 '--write-debug-log', '-v', | 312 '--write-debug-log', '-v', |
312 '--time'] | 313 '--time', |
| 314 '%s/%s/%s/' % (package_name, package_name, folder)] |
313 system = bot_info.system | 315 system = bot_info.system |
314 xvfb_command = ['xvfb-run', '-a', '--server-args=-screen 0 1024x768x24'] | 316 xvfb_command = ['xvfb-run', '-a', '--server-args=-screen 0 1024x768x24'] |
315 xvfb_args = xvfb_command if system == 'linux' else [] | 317 xvfb_args = xvfb_command if system == 'linux' else [] |
316 with BuildStep('Test vm release mode', swallow_error=True): | 318 with BuildStep('Test vm release mode', swallow_error=True): |
317 args = [sys.executable, 'tools/test.py', | 319 args = [sys.executable, 'tools/test.py', |
318 '-mrelease', '-rvm', '-cnone'] + standard_args | 320 '-mrelease', '-rvm', '-cnone'] + standard_args |
319 RunProcess(args) | 321 RunProcess(args) |
320 if bot_info.system != 'windows': | 322 if bot_info.system != 'windows': |
321 with BuildStep('Test dartium', swallow_error=True): | 323 with BuildStep('Test dartium', swallow_error=True): |
322 test_args = [sys.executable, 'tools/test.py', | 324 test_args = [sys.executable, 'tools/test.py', |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 print 'Running testing in copy of package in %s' % copy_path | 364 print 'Running testing in copy of package in %s' % copy_path |
363 RunPrePubUpgradeHooks(test_config) | 365 RunPrePubUpgradeHooks(test_config) |
364 RunPubUpgrade(bot_info, copy_path) | 366 RunPubUpgrade(bot_info, copy_path) |
365 | 367 |
366 RunPrePubBuildHooks(test_config) | 368 RunPrePubBuildHooks(test_config) |
367 RunPubBuild(bot_info, copy_path, 'web') | 369 RunPubBuild(bot_info, copy_path, 'web') |
368 RunPubBuild(bot_info, copy_path, 'test', 'debug') | 370 RunPubBuild(bot_info, copy_path, 'test', 'debug') |
369 FixupTestControllerJS(copy_path) | 371 FixupTestControllerJS(copy_path) |
370 | 372 |
371 RunPreTestHooks(test_config) | 373 RunPreTestHooks(test_config) |
372 RunPackageTesting(bot_info, copy_path) | 374 RunPackageTesting(bot_info, copy_path, 'test') |
| 375 RunPackageTesting(bot_info, copy_path, 'build/test') |
373 RunPostTestHooks(test_config) | 376 RunPostTestHooks(test_config) |
OLD | NEW |