| 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 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1052 self.Print('analyze output:') | 1052 self.Print('analyze output:') |
| 1053 self.PrintJSON(outp) | 1053 self.PrintJSON(outp) |
| 1054 self.Print() | 1054 self.Print() |
| 1055 | 1055 |
| 1056 return ret | 1056 return ret |
| 1057 | 1057 |
| 1058 def GetIsolateCommand(self, target, vals): | 1058 def GetIsolateCommand(self, target, vals): |
| 1059 isolate_map = self.ReadIsolateMap() | 1059 isolate_map = self.ReadIsolateMap() |
| 1060 | 1060 |
| 1061 android = 'target_os="android"' in vals['gn_args'] | 1061 android = 'target_os="android"' in vals['gn_args'] |
| 1062 ozone = 'use_ozone=true' in vals['gn_args'] | |
| 1063 chromeos = 'target_os="chromeos"' in vals['gn_args'] | |
| 1064 | 1062 |
| 1065 # This should be true if tests with type='windowed_test_launcher' are | 1063 # This should be true if tests with type='windowed_test_launcher' are |
| 1066 # expected to run using xvfb. For example, Linux Desktop, X11 CrOS and | 1064 # expected to run using xvfb. For example, Linux Desktop, X11 CrOS and |
| 1067 # Ozone CrOS builds. | 1065 # Ozone CrOS builds. Note that one Ozone build can be used to run differen |
| 1066 # backends. Currently, tests are executed for the headless and X11 backends |
| 1067 # and both can run under Xvfb. |
| 1068 # TODO(tonikitoo,msisov,fwang): Find a way to run tests for the Wayland |
| 1069 # backend. |
| 1068 use_xvfb = (self.platform == 'linux2' and | 1070 use_xvfb = (self.platform == 'linux2' and |
| 1069 not android and | 1071 not android) |
| 1070 ((not ozone) or (ozone and chromeos))) | |
| 1071 | 1072 |
| 1072 asan = 'is_asan=true' in vals['gn_args'] | 1073 asan = 'is_asan=true' in vals['gn_args'] |
| 1073 msan = 'is_msan=true' in vals['gn_args'] | 1074 msan = 'is_msan=true' in vals['gn_args'] |
| 1074 tsan = 'is_tsan=true' in vals['gn_args'] | 1075 tsan = 'is_tsan=true' in vals['gn_args'] |
| 1075 | 1076 |
| 1076 test_type = isolate_map[target]['type'] | 1077 test_type = isolate_map[target]['type'] |
| 1077 | 1078 |
| 1078 executable = isolate_map[target].get('executable', target) | 1079 executable = isolate_map[target].get('executable', target) |
| 1079 executable_suffix = '.exe' if self.platform == 'win32' else '' | 1080 executable_suffix = '.exe' if self.platform == 'win32' else '' |
| 1080 | 1081 |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1560 # Then check to see if the arg contains any metacharacters other than | 1561 # Then check to see if the arg contains any metacharacters other than |
| 1561 # double quotes; if it does, quote everything (including the double | 1562 # double quotes; if it does, quote everything (including the double |
| 1562 # quotes) for safety. | 1563 # quotes) for safety. |
| 1563 if any(a in UNSAFE_FOR_CMD for a in arg): | 1564 if any(a in UNSAFE_FOR_CMD for a in arg): |
| 1564 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg) | 1565 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg) |
| 1565 return arg | 1566 return arg |
| 1566 | 1567 |
| 1567 | 1568 |
| 1568 if __name__ == '__main__': | 1569 if __name__ == '__main__': |
| 1569 sys.exit(main(sys.argv[1:])) | 1570 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |