OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2017 the V8 project authors. All rights reserved. | 2 # Copyright 2017 the V8 project 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 Convenience wrapper for compiling V8 with gn/ninja and running tests. | 6 Convenience wrapper for compiling V8 with gn/ninja and running tests. |
7 Sets up build output directories if they don't exist. | 7 Sets up build output directories if they don't exist. |
8 Produces simulator builds for non-Intel target architectures. | 8 Produces simulator builds for non-Intel target architectures. |
9 Uses Goma by default if it is detected (at output directory setup time). | 9 Uses Goma by default if it is detected (at output directory setup time). |
10 Expects to be run from the root of a V8 checkout. | 10 Expects to be run from the root of a V8 checkout. |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 for c in self.configs: | 281 for c in self.configs: |
282 self.configs[c].Extend(self.global_targets, self.global_tests) | 282 self.configs[c].Extend(self.global_targets, self.global_tests) |
283 return self.configs | 283 return self.configs |
284 | 284 |
285 def Main(argv): | 285 def Main(argv): |
286 parser = ArgumentParser() | 286 parser = ArgumentParser() |
287 configs = parser.ParseArguments(argv[1:]) | 287 configs = parser.ParseArguments(argv[1:]) |
288 return_code = 0 | 288 return_code = 0 |
289 for c in configs: | 289 for c in configs: |
290 return_code += configs[c].Build() | 290 return_code += configs[c].Build() |
291 for c in configs: | 291 if return_code == 0: |
292 return_code += configs[c].RunTests() | 292 for c in configs: |
| 293 return_code += configs[c].RunTests() |
293 if return_code == 0: | 294 if return_code == 0: |
294 _Call("notify-send 'Done!' 'V8 compilation finished successfully.'", | 295 _Call("notify-send 'Done!' 'V8 compilation finished successfully.'", |
295 silent=True) | 296 silent=True) |
296 else: | 297 else: |
297 _Call("notify-send 'Error!' 'V8 compilation finished with errors.'", | 298 _Call("notify-send 'Error!' 'V8 compilation finished with errors.'", |
298 silent=True) | 299 silent=True) |
299 return return_code | 300 return return_code |
300 | 301 |
301 if __name__ == "__main__": | 302 if __name__ == "__main__": |
302 sys.exit(Main(sys.argv)) | 303 sys.exit(Main(sys.argv)) |
OLD | NEW |