| OLD | NEW |
| 1 # Copyright (C) 2009, Google Inc. All rights reserved. | 1 # Copyright (C) 2009, Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 return os.path.join("Tools", "Scripts", script_name) | 55 return os.path.join("Tools", "Scripts", script_name) |
| 56 | 56 |
| 57 def script_shell_command(self, script_name): | 57 def script_shell_command(self, script_name): |
| 58 script_path = self.script_path(script_name) | 58 script_path = self.script_path(script_name) |
| 59 return Executive.shell_command_for_script(script_path) | 59 return Executive.shell_command_for_script(script_path) |
| 60 | 60 |
| 61 @staticmethod | 61 @staticmethod |
| 62 def port(port_name): | 62 def port(port_name): |
| 63 ports = { | 63 ports = { |
| 64 "chromium": ChromiumPort, | 64 "chromium": ChromiumPort, |
| 65 "chromium-android": ChromiumAndroidPort, | 65 "chromium-android": AndroidPort, |
| 66 "chromium-xvfb": ChromiumXVFBPort, | 66 "chromium-xvfb": ChromiumXVFBPort, |
| 67 } | 67 } |
| 68 return ports.get(port_name, ChromiumPort)() | 68 return ports.get(port_name, ChromiumPort)() |
| 69 | 69 |
| 70 def makeArgs(self): | 70 def makeArgs(self): |
| 71 # FIXME: This shouldn't use a static Executive(). | 71 # FIXME: This shouldn't use a static Executive(). |
| 72 args = '--makeargs="-j%s"' % Executive().cpu_count() | 72 args = '--makeargs="-j%s"' % Executive().cpu_count() |
| 73 if os.environ.has_key('MAKEFLAGS'): | 73 if os.environ.has_key('MAKEFLAGS'): |
| 74 args = '--makeargs="%s"' % os.environ['MAKEFLAGS'] | 74 args = '--makeargs="%s"' % os.environ['MAKEFLAGS'] |
| 75 return args | 75 return args |
| (...skipping 24 matching lines...) Expand all Loading... |
| 100 # Note: This could be run-webkit-tests now. | 100 # Note: This could be run-webkit-tests now. |
| 101 command = self.script_shell_command("new-run-webkit-tests") | 101 command = self.script_shell_command("new-run-webkit-tests") |
| 102 command.append("--chromium") | 102 command.append("--chromium") |
| 103 command.append("--skip-failing-tests") | 103 command.append("--skip-failing-tests") |
| 104 return command | 104 return command |
| 105 | 105 |
| 106 def run_webkit_unit_tests_command(self): | 106 def run_webkit_unit_tests_command(self): |
| 107 return self.script_shell_command("run-chromium-webkit-unit-tests") | 107 return self.script_shell_command("run-chromium-webkit-unit-tests") |
| 108 | 108 |
| 109 | 109 |
| 110 class ChromiumAndroidPort(ChromiumPort): | 110 class AndroidPort(ChromiumPort): |
| 111 port_flag_name = "chromium-android" | 111 port_flag_name = "chromium-android" |
| 112 | 112 |
| 113 | 113 |
| 114 class ChromiumXVFBPort(ChromiumPort): | 114 class ChromiumXVFBPort(ChromiumPort): |
| 115 port_flag_name = "chromium-xvfb" | 115 port_flag_name = "chromium-xvfb" |
| 116 | 116 |
| 117 def run_webkit_tests_command(self): | 117 def run_webkit_tests_command(self): |
| 118 return ["xvfb-run"] + super(ChromiumXVFBPort, self).run_webkit_tests_com
mand() | 118 return ["xvfb-run"] + super(ChromiumXVFBPort, self).run_webkit_tests_com
mand() |
| OLD | NEW |