summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-16 17:15:47 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-16 17:15:47 +0000
commitadbae7e226e63018f388bdb197ca5c8f36514a45 (patch)
treed55a7a0778165787b4f0ea6216dde4108818dcab /chrome
parent6b8c8e75fdb1ddb0329c1309c993748aa86c6b33 (diff)
downloadchromium_src-adbae7e226e63018f388bdb197ca5c8f36514a45.zip
chromium_src-adbae7e226e63018f388bdb197ca5c8f36514a45.tar.gz
chromium_src-adbae7e226e63018f388bdb197ca5c8f36514a45.tar.bz2
Add support for Linux kernels >=3.0-rc1 in Python related build files by:
- replacing occurences of sys.platform == 'linux2' with sys.platform.startswith('linux') - congregating occurences of sys.platform in ('linux[X]', 'linuxY', ...) to sys.platform.startswith('linux') - adding the key 'linux3' to all relevant lookup dicts BUG=85845 TEST=Try building chromium on Linux >=3.0-r1 Review URL: http://codereview.chromium.org/7172016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89354 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rwxr-xr-xchrome/common/extensions/docs/build/build.py4
-rw-r--r--chrome/test/pyautolib/pyauto.py7
-rw-r--r--chrome/test/pyautolib/pyauto_utils.py5
-rw-r--r--chrome/test/webdriver/chromedriver_launcher.py4
-rw-r--r--chrome/test/webdriver/run_webdriver_tests.py1
-rwxr-xr-xchrome/tools/process_dumps_linux.py2
6 files changed, 16 insertions, 7 deletions
diff --git a/chrome/common/extensions/docs/build/build.py b/chrome/common/extensions/docs/build/build.py
index 35bc3ac..7258243 100755
--- a/chrome/common/extensions/docs/build/build.py
+++ b/chrome/common/extensions/docs/build/build.py
@@ -1,5 +1,5 @@
#!/usr/bin/python
-# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -129,7 +129,7 @@ def FindDumpRenderTree():
search_locations.append(home_dir + "/bin/DumpRenderTree/"
"DumpRenderTree.exe")
- if (sys.platform in ('linux', 'linux2')):
+ if (sys.platform.startswith('linux')):
search_locations.append(src_dir + "/sconsbuild/Release/DumpRenderTree")
search_locations.append(src_dir + "/out/Release/DumpRenderTree")
search_locations.append(src_dir + "/sconsbuild/Debug/DumpRenderTree")
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py
index d2b9e73..d975258 100644
--- a/chrome/test/pyautolib/pyauto.py
+++ b/chrome/test/pyautolib/pyauto.py
@@ -51,6 +51,10 @@ def _LocateBinDirs():
os.path.join(chrome_src, 'sconsbuild', 'Debug'),
os.path.join(chrome_src, 'out', 'Release'),
os.path.join(chrome_src, 'sconsbuild', 'Release')],
+ 'linux3': [ os.path.join(chrome_src, 'out', 'Debug'),
+ os.path.join(chrome_src, 'sconsbuild', 'Debug'),
+ os.path.join(chrome_src, 'out', 'Release'),
+ os.path.join(chrome_src, 'sconsbuild', 'Release')],
'darwin': [ os.path.join(chrome_src, 'xcodebuild', 'Debug'),
os.path.join(chrome_src, 'xcodebuild', 'Release')],
'win32': [ os.path.join(chrome_src, 'chrome', 'Debug'),
@@ -411,7 +415,7 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
@staticmethod
def IsLinux():
"""Are we on Linux? ChromeOS is linux too."""
- return 'linux2' == sys.platform
+ return sys.platform.startswith('linux')
@staticmethod
def IsWin():
@@ -3447,6 +3451,7 @@ class Main(object):
'win32': 'win',
'darwin': 'mac',
'linux2': 'linux',
+ 'linux3': 'linux',
'chromeos': 'chromeos',
}
diff --git a/chrome/test/pyautolib/pyauto_utils.py b/chrome/test/pyautolib/pyauto_utils.py
index 7915e179..a0173f0 100644
--- a/chrome/test/pyautolib/pyauto_utils.py
+++ b/chrome/test/pyautolib/pyauto_utils.py
@@ -1,6 +1,5 @@
#!/usr/bin/python
-
-# Copyright (c) 2010 The Chromium Authors. All rights reserved.
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -133,7 +132,7 @@ def GetCurrentPlatform():
return 'mac'
if sys.platform == 'win32':
return 'win'
- if sys.platform == 'linux2':
+ if sys.platform.startswith('linux'):
return 'linux'
raise RuntimeError('Unknown platform')
diff --git a/chrome/test/webdriver/chromedriver_launcher.py b/chrome/test/webdriver/chromedriver_launcher.py
index e4be1c8..b078141 100644
--- a/chrome/test/webdriver/chromedriver_launcher.py
+++ b/chrome/test/webdriver/chromedriver_launcher.py
@@ -66,6 +66,10 @@ class ChromeDriverLauncher:
os.path.join(chrome_src, 'sconsbuild', 'Debug'),
os.path.join(chrome_src, 'out', 'Release'),
os.path.join(chrome_src, 'sconsbuild', 'Release')],
+ 'linux3': [ os.path.join(chrome_src, 'out', 'Debug'),
+ os.path.join(chrome_src, 'sconsbuild', 'Debug'),
+ os.path.join(chrome_src, 'out', 'Release'),
+ os.path.join(chrome_src, 'sconsbuild', 'Release')],
'darwin': [ os.path.join(chrome_src, 'xcodebuild', 'Debug'),
os.path.join(chrome_src, 'xcodebuild', 'Release')],
'win32': [ os.path.join(chrome_src, 'chrome', 'Debug'),
diff --git a/chrome/test/webdriver/run_webdriver_tests.py b/chrome/test/webdriver/run_webdriver_tests.py
index b9baf43..3a8fe4b 100644
--- a/chrome/test/webdriver/run_webdriver_tests.py
+++ b/chrome/test/webdriver/run_webdriver_tests.py
@@ -32,6 +32,7 @@ class Main(object):
'win32': 'win',
'darwin': 'mac',
'linux2': 'linux',
+ 'linux3': 'linux',
}
TEST_PREFIX = 'selenium.test.selenium.webdriver.common.'
diff --git a/chrome/tools/process_dumps_linux.py b/chrome/tools/process_dumps_linux.py
index 26e37fd..3e3bf3e 100755
--- a/chrome/tools/process_dumps_linux.py
+++ b/chrome/tools/process_dumps_linux.py
@@ -292,7 +292,7 @@ if '__main__' == __name__:
(options, args) = parser.parse_args()
- if sys.platform == 'linux2':
+ if sys.platform.startswith('linux'):
sys.exit(main_linux(options, args))
else:
sys.exit(1)