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

Side by Side Diff: build/android/test_runner.py

Issue 2974163002: Fix the stack script issue when symbolizing tombstones. (Closed)
Patch Set: add unziped so files as packed-lib Created 3 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
« no previous file with comments | « no previous file | build/android/tombstones.py » ('j') | build/android/tombstones.py » ('J')
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 # 2 #
3 # Copyright 2013 The Chromium Authors. All rights reserved. 3 # Copyright 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Runs all types of tests from one unified interface.""" 7 """Runs all types of tests from one unified interface."""
8 8
9 import argparse 9 import argparse
10 import collections 10 import collections
11 import contextlib 11 import contextlib
12 import itertools 12 import itertools
13 import logging 13 import logging
14 import os 14 import os
15 import shutil 15 import shutil
16 import signal 16 import signal
17 import subprocess
17 import sys 18 import sys
18 import threading 19 import threading
19 import traceback 20 import traceback
20 import unittest 21 import unittest
21 22
22 # Import _strptime before threaded code. datetime.datetime.strptime is 23 # Import _strptime before threaded code. datetime.datetime.strptime is
23 # threadsafe except for the initial import of the _strptime module. 24 # threadsafe except for the initial import of the _strptime module.
24 # See http://crbug.com/724524 and https://bugs.python.org/issue7980. 25 # See http://crbug.com/724524 and https://bugs.python.org/issue7980.
25 import _strptime # pylint: disable=unused-import 26 import _strptime # pylint: disable=unused-import
26 27
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 shutil.copyfileobj(src, dst) 780 shutil.copyfileobj(src, dst)
780 dst.close() 781 dst.close()
781 logging.critical( 782 logging.critical(
782 'Logcat: %s', logdog_helper.get_viewer_url('unified_logcats')) 783 'Logcat: %s', logdog_helper.get_viewer_url('unified_logcats'))
783 784
784 785
785 logcats_uploader = contextlib_ext.Optional( 786 logcats_uploader = contextlib_ext.Optional(
786 upload_logcats_file(), 787 upload_logcats_file(),
787 'upload_logcats_file' in args and args.upload_logcats_file) 788 'upload_logcats_file' in args and args.upload_logcats_file)
788 789
790 if 'apk_under_test' in args and args.apk_under_test:
791 subprocess.check_call(
792 'unzip -o %s -d %s' % (args.apk_under_test,
793 constants.GetOutDirectory()),
794 shell=True)
mikecase (-- gone --) 2017/07/11 21:42:01 Would it make more sense for the stack/tombstone s
jbudorick 2017/07/12 20:57:28 We had discussed doing the latter last week, w/ th
BigBossZhiling 2017/07/17 06:42:58 I just added the unzip logic in tombstones.py, bec
795
789 ### Set up test objects. 796 ### Set up test objects.
790 797
791 env = environment_factory.CreateEnvironment(args, infra_error) 798 env = environment_factory.CreateEnvironment(args, infra_error)
792 test_instance = test_instance_factory.CreateTestInstance(args, infra_error) 799 test_instance = test_instance_factory.CreateTestInstance(args, infra_error)
793 test_run = test_run_factory.CreateTestRun( 800 test_run = test_run_factory.CreateTestRun(
794 args, env, test_instance, infra_error) 801 args, env, test_instance, infra_error)
795 802
796 ### Run. 803 ### Run.
797 804
798 with json_writer, logcats_uploader, env, test_instance, test_run: 805 with json_writer, logcats_uploader, env, test_instance, test_run:
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 if e.is_infra_error: 944 if e.is_infra_error:
938 return constants.INFRA_EXIT_CODE 945 return constants.INFRA_EXIT_CODE
939 return constants.ERROR_EXIT_CODE 946 return constants.ERROR_EXIT_CODE
940 except: # pylint: disable=W0702 947 except: # pylint: disable=W0702
941 logging.exception('Unrecognized error occurred.') 948 logging.exception('Unrecognized error occurred.')
942 return constants.ERROR_EXIT_CODE 949 return constants.ERROR_EXIT_CODE
943 950
944 951
945 if __name__ == '__main__': 952 if __name__ == '__main__':
946 sys.exit(main()) 953 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | build/android/tombstones.py » ('j') | build/android/tombstones.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698