Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1117)

Unified Diff: native_client_sdk/src/tools/tests/getos_test.py

Issue 86053005: [NaCl SDK] Fix "make debug" and "make run" on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add default paths, basenames Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« native_client_sdk/src/tools/getos.py ('K') | « native_client_sdk/src/tools/run.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/tools/tests/getos_test.py
diff --git a/native_client_sdk/src/tools/tests/getos_test.py b/native_client_sdk/src/tools/tests/getos_test.py
index 99ffb95079fb013b12bc39f7b9d89ec570e5a806..b687d9190599f4be3461732761a031db29cd4ce5 100755
--- a/native_client_sdk/src/tools/tests/getos_test.py
+++ b/native_client_sdk/src/tools/tests/getos_test.py
@@ -71,21 +71,23 @@ class TestGetos(TestCaseExtended):
"""honors CHROME_PATH environment."""
with mock.patch.dict('os.environ', {'CHROME_PATH': '/dummy/file'}):
expect = "Invalid CHROME_PATH.*/dummy/file"
+ platform = getos.GetPlatform()
if hasattr(self, 'assertRaisesRegexp'):
with self.assertRaisesRegexp(getos.Error, expect):
- getos.GetChromePath()
+ getos.GetChromePath(platform)
else:
# TODO(sbc): remove this path once we switch to python2.7 everywhere
- self.assertRaises(getos.Error, getos.GetChromePath)
+ self.assertRaises(getos.Error, getos.GetChromePath, platform)
def testGetChromePathCheckExists(self):
"""checks that existence of explicitly CHROME_PATH is checked."""
mock_location = '/bin/ls'
- if getos.GetPlatform() == 'win':
+ platform = getos.GetPlatform()
+ if platform == 'win':
mock_location = 'c:\\nowhere'
with mock.patch.dict('os.environ', {'CHROME_PATH': mock_location}):
with mock.patch('os.path.exists') as mock_exists:
- chrome = getos.GetChromePath()
+ chrome = getos.GetChromePath(platform)
self.assertEqual(chrome, mock_location)
mock_exists.assert_called_with(chrome)
« native_client_sdk/src/tools/getos.py ('K') | « native_client_sdk/src/tools/run.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698