Chromium Code Reviews| Index: build/android/tombstones.py |
| diff --git a/build/android/tombstones.py b/build/android/tombstones.py |
| index dbc6281c2f541af6cde7978be0c12115210379f7..362b71f16a1c85e82542921e4e1fc71e337e5f3e 100755 |
| --- a/build/android/tombstones.py |
| +++ b/build/android/tombstones.py |
| @@ -132,6 +132,13 @@ def _ResolveSymbols(tombstone_data, include_stack, device_abi): |
| 'scripts', 'stack') |
| cmd = [stack_tool, '--arch', arch, '--output-directory', |
| constants.GetOutDirectory()] |
| + if os.path.exists(os.path.join(constants.GetOutDirectory(), 'lib')): |
| + for root, _, files in os.walk(os.path.join(constants.GetOutDirectory(), |
| + 'lib')): |
| + for file_name in files: |
| + if file_name.endswith('.so'): |
| + cmd.extend(['--packed-lib', os.path.join(root, file_name)]) |
|
jbudorick
2017/07/17 15:50:45
For symbols, the script will find the lib.unstripp
|
| + |
| proc = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE) |
| output = proc.communicate(input='\n'.join(tombstone_data))[0] |
| for line in output.split('\n'): |
| @@ -236,7 +243,7 @@ def ClearAllTombstones(device): |
| def ResolveTombstones(device, resolve_all_tombstones, include_stack_symbols, |
| - wipe_tombstones, jobs=4): |
| + wipe_tombstones, jobs=4, apk_under_test=None): |
| """Resolve tombstones in the device. |
| Args: |
| @@ -249,6 +256,12 @@ def ResolveTombstones(device, resolve_all_tombstones, include_stack_symbols, |
| Returns: |
| A list of resolved tombstones. |
| """ |
| + if apk_under_test: |
| + subprocess.check_call( |
|
jbudorick
2017/07/17 16:43:48
Er, sorry, thought of this after sending the revie
|
| + 'unzip -o %s -d %s' % (apk_under_test, |
|
jbudorick
2017/07/17 15:50:45
nit: pass this as a list, i.e.
['unzip', ...]
|
| + constants.GetOutDirectory()), |
|
jbudorick
2017/07/17 15:50:45
I don't think we should extract this directly into
|
| + shell=True) |
|
jbudorick
2017/07/17 15:50:45
This shouldn't need shell features.
|
| + |
| return _ResolveTombstones(jobs, |
| _GetTombstonesForDevice(device, |
| resolve_all_tombstones, |