OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 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 """MB - the Meta-Build wrapper around GYP and GN | 6 """MB - the Meta-Build wrapper around GYP and GN |
7 | 7 |
8 MB is a wrapper script for GYP and GN that can be used to generate build files | 8 MB is a wrapper script for GYP and GN that can be used to generate build files |
9 for sets of canned configurations and analyze them. | 9 for sets of canned configurations and analyze them. |
10 """ | 10 """ |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
550 '--enable-gpu', | 550 '--enable-gpu', |
551 '--test-launcher-jobs=1', | 551 '--test-launcher-jobs=1', |
552 '--gtest_filter=%s' % gtest_filter, | 552 '--gtest_filter=%s' % gtest_filter, |
553 ] | 553 ] |
554 elif test_type == 'script': | 554 elif test_type == 'script': |
555 extra_files = [ | 555 extra_files = [ |
556 '../../testing/test_env.py' | 556 '../../testing/test_env.py' |
557 ] | 557 ] |
558 cmdline = [ | 558 cmdline = [ |
559 '../../testing/test_env.py', | 559 '../../testing/test_env.py', |
560 ] + ['../../' + self.ToSrcRelPath(gn_isolate_map[target]['script'])] | 560 '../../' + self.ToSrcRelPath(gn_isolate_map[target]['script']) |
561 ] + gn_isolate_map[target].get('args', []) | |
M-A Ruel
2015/09/22 17:08:19
It'd be more readable to use:
]
cmdline.extend(gn_
Dirk Pranke
2015/09/22 17:48:52
meh :)
| |
561 elif test_type in ('raw'): | 562 elif test_type in ('raw'): |
562 extra_files = [] | 563 extra_files = [] |
563 cmdline = [ | 564 cmdline = [ |
564 './' + str(target) + executable_suffix, | 565 './' + str(target) + executable_suffix, |
565 ] + gn_isolate_map[target].get('args') | 566 ] + gn_isolate_map[target].get('args') |
566 | 567 |
567 else: | 568 else: |
568 self.WriteFailureAndRaise('No command line for %s found (test type %s).' | 569 self.WriteFailureAndRaise('No command line for %s found (test type %s).' |
569 % (target, test_type), output_path=None) | 570 % (target, test_type), output_path=None) |
570 | 571 |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
817 | 818 |
818 if __name__ == '__main__': | 819 if __name__ == '__main__': |
819 try: | 820 try: |
820 sys.exit(main(sys.argv[1:])) | 821 sys.exit(main(sys.argv[1:])) |
821 except MBErr as e: | 822 except MBErr as e: |
822 print(e) | 823 print(e) |
823 sys.exit(1) | 824 sys.exit(1) |
824 except KeyboardInterrupt: | 825 except KeyboardInterrupt: |
825 print("interrupted, exiting", stream=sys.stderr) | 826 print("interrupted, exiting", stream=sys.stderr) |
826 sys.exit(130) | 827 sys.exit(130) |
OLD | NEW |