Lines 1-120
Link Here
|
1 |
#!/usr/bin/env python |
|
|
2 |
# Copyright (C) 2010 Google Inc. All rights reserved. |
3 |
# |
4 |
# Redistribution and use in source and binary forms, with or without |
5 |
# modification, are permitted provided that the following conditions are |
6 |
# met: |
7 |
# |
8 |
# * Redistributions of source code must retain the above copyright |
9 |
# notice, this list of conditions and the following disclaimer. |
10 |
# * Redistributions in binary form must reproduce the above |
11 |
# copyright notice, this list of conditions and the following disclaimer |
12 |
# in the documentation and/or other materials provided with the |
13 |
# distribution. |
14 |
|
15 |
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
16 |
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
17 |
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
18 |
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
19 |
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
20 |
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
21 |
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
22 |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
23 |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
25 |
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 |
|
27 |
import chromium_linux |
28 |
import chromium_mac |
29 |
import chromium_win |
30 |
|
31 |
|
32 |
def _test_expectations_overrides(port, super): |
33 |
# The chrome ports use the regular overrides plus anything in the |
34 |
# official test_expectations as well. Hopefully we don't get collisions. |
35 |
chromium_overrides = super.test_expectations_overrides(port) |
36 |
|
37 |
# FIXME: It used to be that AssertionError would get raised by |
38 |
# path_from_chromium_base() if we weren't in a Chromium checkout, but |
39 |
# this changed in r60427. This should probably be changed back. |
40 |
overrides_path = port.path_from_chromium_base('webkit', 'tools', |
41 |
'layout_tests', 'test_expectations_chrome.txt') |
42 |
if not port._filesystem.exists(overrides_path): |
43 |
return chromium_overrides |
44 |
|
45 |
chromium_overrides = chromium_overrides or '' |
46 |
return chromium_overrides + port._filesystem.read_text_file(overrides_path) |
47 |
|
48 |
|
49 |
class GoogleChromeLinux32Port(chromium_linux.ChromiumLinuxPort): |
50 |
port_name = 'google-chrome-linux32' |
51 |
|
52 |
# FIXME: Make google-chrome-XXX work as a port name. |
53 |
@classmethod |
54 |
def determine_full_port_name(cls, host, options, port_name): |
55 |
return 'chromium-linux-x86' |
56 |
|
57 |
def baseline_search_path(self): |
58 |
paths = chromium_linux.ChromiumLinuxPort.baseline_search_path(self) |
59 |
paths.insert(0, self._webkit_baseline_path('google-chrome-linux32')) |
60 |
return paths |
61 |
|
62 |
def test_expectations_overrides(self): |
63 |
return _test_expectations_overrides(self, chromium_linux.ChromiumLinuxPort) |
64 |
|
65 |
def architecture(self): |
66 |
return 'x86' |
67 |
|
68 |
|
69 |
class GoogleChromeLinux64Port(chromium_linux.ChromiumLinuxPort): |
70 |
port_name = 'google-chrome-linux64' |
71 |
|
72 |
# FIXME: Make google-chrome-XXX work as a port name. |
73 |
@classmethod |
74 |
def determine_full_port_name(cls, host, options, port_name): |
75 |
return 'chromium-linux-x86_64' |
76 |
|
77 |
def baseline_search_path(self): |
78 |
paths = chromium_linux.ChromiumLinuxPort.baseline_search_path(self) |
79 |
paths.insert(0, self._webkit_baseline_path('google-chrome-linux64')) |
80 |
return paths |
81 |
|
82 |
def test_expectations_overrides(self): |
83 |
return _test_expectations_overrides(self, chromium_linux.ChromiumLinuxPort) |
84 |
|
85 |
def architecture(self): |
86 |
return 'x86_64' |
87 |
|
88 |
|
89 |
class GoogleChromeMacPort(chromium_mac.ChromiumMacPort): |
90 |
port_name = 'google-chrome-mac' |
91 |
|
92 |
# FIXME: Make google-chrome-XXX work as a port name. |
93 |
@classmethod |
94 |
def determine_full_port_name(cls, host, options, port_name): |
95 |
return 'chromium-mac-snowleopard' |
96 |
|
97 |
def baseline_search_path(self): |
98 |
paths = chromium_mac.ChromiumMacPort.baseline_search_path(self) |
99 |
paths.insert(0, self._webkit_baseline_path('google-chrome-mac')) |
100 |
return paths |
101 |
|
102 |
def test_expectations_overrides(self): |
103 |
return _test_expectations_overrides(self, chromium_mac.ChromiumMacPort) |
104 |
|
105 |
|
106 |
class GoogleChromeWinPort(chromium_win.ChromiumWinPort): |
107 |
port_name = 'google-chrome-win' |
108 |
|
109 |
# FIXME: Make google-chrome-XXX work as a port name. |
110 |
@classmethod |
111 |
def determine_full_port_name(cls, host, options, port_name): |
112 |
return 'chromium-win-win7' |
113 |
|
114 |
def baseline_search_path(self): |
115 |
paths = chromium_win.ChromiumWinPort.baseline_search_path(self) |
116 |
paths.insert(0, self._webkit_baseline_path('google-chrome-win')) |
117 |
return paths |
118 |
|
119 |
def test_expectations_overrides(self): |
120 |
return _test_expectations_overrides(self, chromium_win.ChromiumWinPort) |