| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 DEPS = [ | 5 DEPS = [ |
| 6 'gclient', | 6 'gclient', |
| 7 'path', | 7 'path', |
| 8 'platform', | 8 'platform', |
| 9 'properties', | 9 'properties', |
| 10 'python', | 10 'python', |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 args=['gn', build_type] + args, | 51 args=['gn', build_type] + args, |
| 52 cwd=api.path['checkout'], | 52 cwd=api.path['checkout'], |
| 53 env=env) | 53 env=env) |
| 54 api.python('mojob build', | 54 api.python('mojob build', |
| 55 mojob_path, | 55 mojob_path, |
| 56 args=['build', build_type] + args, | 56 args=['build', build_type] + args, |
| 57 env = env) | 57 env = env) |
| 58 | 58 |
| 59 def _RunTests(api, build_type): | 59 def _RunTests(api, build_type): |
| 60 mojob_path = api.path['checkout'].join('mojo', 'tools', 'mojob.py') | 60 mojob_path = api.path['checkout'].join('mojo', 'tools', 'mojob.py') |
| 61 api.python('mojob test', mojob_path, args=['test', build_type]) | 61 api.python('mojob test', mojob_path, args=[ |
| 62 'test', build_type, |
| 63 '--master-name', api.properties.get('mastername'), |
| 64 '--builder-name', api.properties.get('buildername'), |
| 65 '--build-number', api.properties.get('buildnumber'), |
| 66 '--test-results-server', api.properties.get('test_results_server', |
| 67 'test-results.appspot.com'), |
| 68 ]) |
| 62 | 69 |
| 63 def _UploadShell(api): | 70 def _UploadShell(api): |
| 64 upload_path = api.path['checkout'].join('mojo', 'tools', | 71 upload_path = api.path['checkout'].join('mojo', 'tools', |
| 65 'upload_shell_binary.py') | 72 'upload_shell_binary.py') |
| 66 api.python('upload shell binary', upload_path) | 73 api.python('upload shell binary', upload_path) |
| 67 | 74 |
| 68 def GenSteps(api): | 75 def GenSteps(api): |
| 69 buildername = api.properties.get('buildername') | 76 buildername = api.properties.get('buildername') |
| 70 _CheckoutSteps(api, buildername) | 77 _CheckoutSteps(api, buildername) |
| 71 build_type = '--debug' if 'dbg' in buildername else '--release' | 78 build_type = '--debug' if 'dbg' in buildername else '--release' |
| 72 _BuildSteps(api, buildername, build_type) | 79 _BuildSteps(api, buildername, build_type) |
| 73 if 'Linux' in buildername or 'Win' in buildername: | 80 if 'Linux' in buildername or 'Win' in buildername: |
| 74 _RunTests(api, build_type) | 81 _RunTests(api, build_type) |
| 75 if 'Linux' in buildername and build_type == '--release': | 82 if 'Linux' in buildername and build_type == '--release': |
| 76 _UploadShell(api) | 83 _UploadShell(api) |
| 77 | 84 |
| 78 def GenTests(api): | 85 def GenTests(api): |
| 79 tests = [['mojo_linux', 'Mojo Linux'], | 86 tests = [['mojo_linux', 'Mojo Linux'], |
| 80 ['mojo_linux_dbg', 'Mojo Linux (dbg)'], | 87 ['mojo_linux_dbg', 'Mojo Linux (dbg)'], |
| 81 ['mojo_android_dbg', 'Mojo Android (dbg)'], | 88 ['mojo_android_dbg', 'Mojo Android (dbg)'], |
| 82 ['mojo_chromeos_dbg', 'Mojo ChromeOS (dbg)'], | 89 ['mojo_chromeos_dbg', 'Mojo ChromeOS (dbg)'], |
| 83 ['mojo_win_dbg', 'Mojo Win (dbg)']] | 90 ['mojo_win_dbg', 'Mojo Win (dbg)']] |
| 84 for t in tests: | 91 for t in tests: |
| 85 yield(api.test(t[0]) + api.properties.generic(buildername=t[1])) | 92 yield(api.test(t[0]) + api.properties.generic(buildername=t[1])) |
| OLD | NEW |