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

Side by Side Diff: build/android/devil/devil_env_test.py

Issue 1539403002: [Android] Revise devil environment handling of host dependencies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix empty config w/o output_directory Created 5 years 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 unified diff | Download patch
« no previous file with comments | « build/android/devil/devil_env.py ('k') | build/android/devil_chromium.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 # pylint: disable=protected-access 6 # pylint: disable=protected-access
7 7
8 import logging 8 import logging
9 import sys 9 import sys
10 import unittest 10 import unittest
(...skipping 30 matching lines...) Expand all
41 def mock_environment(env_var): 41 def mock_environment(env_var):
42 return '/my/fake/adb/path' if env_var == 'ADB_PATH' else None 42 return '/my/fake/adb/path' if env_var == 'ADB_PATH' else None
43 43
44 with mock.patch('os.environ.get', 44 with mock.patch('os.environ.get',
45 mock.Mock(side_effect=mock_environment)): 45 mock.Mock(side_effect=mock_environment)):
46 env_config = devil_env._GetEnvironmentVariableConfig() 46 env_config = devil_env._GetEnvironmentVariableConfig()
47 self.assertEquals( 47 self.assertEquals(
48 { 48 {
49 'adb': { 49 'adb': {
50 'file_info': { 50 'file_info': {
51 'android_linux2': { 51 'linux_x86_64': {
52 'local_paths': ['/my/fake/adb/path'], 52 'local_paths': ['/my/fake/adb/path'],
53 }, 53 },
54 }, 54 },
55 }, 55 },
56 }, 56 },
57 env_config.get('dependencies')) 57 env_config.get('dependencies'))
58 58
59 59
60 if __name__ == '__main__': 60 if __name__ == '__main__':
61 logging.getLogger().setLevel(logging.DEBUG) 61 logging.getLogger().setLevel(logging.DEBUG)
62 unittest.main(verbosity=2) 62 unittest.main(verbosity=2)
OLDNEW
« no previous file with comments | « build/android/devil/devil_env.py ('k') | build/android/devil_chromium.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698