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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py

Issue 2143123004: Access environment variables through Host object instead of directly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased and updated after change for dummy home dir on linux. Created 4 years, 5 months 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
OLDNEW
1 # Copyright (C) 2012 Google Inc. All rights reserved. 1 # Copyright (C) 2012 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 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 self._android_commands.run(['shell', 'echo', '0', '>', KPTR_RESTRICT_PAT H]) 854 self._android_commands.run(['shell', 'echo', '0', '>', KPTR_RESTRICT_PAT H])
855 855
856 _log.debug("Updating kallsyms file (%s) from device" % kallsyms_cache_pa th) 856 _log.debug("Updating kallsyms file (%s) from device" % kallsyms_cache_pa th)
857 self._android_commands.pull("/proc/kallsyms", kallsyms_cache_path) 857 self._android_commands.pull("/proc/kallsyms", kallsyms_cache_path)
858 858
859 self._android_commands.run(['shell', 'echo', saved_kptr_restrict, '>', K PTR_RESTRICT_PATH]) 859 self._android_commands.run(['shell', 'echo', saved_kptr_restrict, '>', K PTR_RESTRICT_PATH])
860 860
861 return kallsyms_cache_path 861 return kallsyms_cache_path
862 862
863 def _find_or_create_symfs(self): 863 def _find_or_create_symfs(self):
864 environment = self._port.host.copy_current_environment() 864 env = self._port.host.environ.copy()
865 env = environment.to_dictionary()
866 fs = self._port.host.filesystem 865 fs = self._port.host.filesystem
867 866
868 if 'ANDROID_SYMFS' in env: 867 if 'ANDROID_SYMFS' in env:
869 symfs_path = env['ANDROID_SYMFS'] 868 symfs_path = env['ANDROID_SYMFS']
870 else: 869 else:
871 symfs_path = fs.join(self._port.results_directory(), 'symfs') 870 symfs_path = fs.join(self._port.results_directory(), 'symfs')
872 _log.debug("ANDROID_SYMFS not set, using %s" % symfs_path) 871 _log.debug("ANDROID_SYMFS not set, using %s" % symfs_path)
873 872
874 # find the installed path, and the path of the symboled built library 873 # find the installed path, and the path of the symboled built library
875 # FIXME: We should get the install path from the device! 874 # FIXME: We should get the install path from the device!
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
1306 return command 1305 return command
1307 1306
1308 def _read_prompt(self, deadline): 1307 def _read_prompt(self, deadline):
1309 last_char = '' 1308 last_char = ''
1310 while True: 1309 while True:
1311 current_char = self._server_process.read_stdout(deadline, 1) 1310 current_char = self._server_process.read_stdout(deadline, 1)
1312 if current_char == ' ': 1311 if current_char == ' ':
1313 if last_char in ('#', '$'): 1312 if last_char in ('#', '$'):
1314 return 1313 return
1315 last_char = current_char 1314 last_char = current_char
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698