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

Side by Side Diff: build/android/pylib/instrumentation/instrumentation_parser.py

Issue 2268193002: Add new Android JUnit Instrumentation Skip code to python script (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Delete empty Created 4 years, 3 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/pylib/instrumentation/instrumentation_test_instance.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging 5 import logging
6 import re 6 import re
7 7
8 # http://developer.android.com/reference/android/test/InstrumentationTestRunner. html 8 # http://developer.android.com/reference/android/test/InstrumentationTestRunner. html
9 STATUS_CODE_START = 1 9 STATUS_CODE_START = 1
10 STATUS_CODE_OK = 0 10 STATUS_CODE_OK = 0
11 STATUS_CODE_ERROR = -1 11 STATUS_CODE_ERROR = -1
12 STATUS_CODE_FAILURE = -2 12 STATUS_CODE_FAILURE = -2
13 13
14 # AndroidJUnitRunner would status output -3 to indicate a test is skipped
15 STATUS_CODE_SKIP = -3
16
14 # http://developer.android.com/reference/android/app/Activity.html 17 # http://developer.android.com/reference/android/app/Activity.html
15 RESULT_CODE_OK = -1 18 RESULT_CODE_OK = -1
16 RESULT_CODE_CANCELED = 0 19 RESULT_CODE_CANCELED = 0
17 20
18 _INSTR_LINE_RE = re.compile(r'^\s*INSTRUMENTATION_([A-Z_]+): (.*)$') 21 _INSTR_LINE_RE = re.compile(r'^\s*INSTRUMENTATION_([A-Z_]+): (.*)$')
19 22
20 23
21 class InstrumentationParser(object): 24 class InstrumentationParser(object):
22 25
23 def __init__(self, stream): 26 def __init__(self, stream):
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 may be None if no instrumentation result was found in the output. 90 may be None if no instrumentation result was found in the output.
88 91
89 Raises: 92 Raises:
90 AssertionError if attempting to get the instrumentation result before 93 AssertionError if attempting to get the instrumentation result before
91 exhausting |IterStatus| first. 94 exhausting |IterStatus| first.
92 """ 95 """
93 assert self._bundle is not None, ( 96 assert self._bundle is not None, (
94 'The IterStatus generator must be exhausted before reading the final' 97 'The IterStatus generator must be exhausted before reading the final'
95 ' instrumentation result.') 98 ' instrumentation result.')
96 return self._code, self._bundle 99 return self._code, self._bundle
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/instrumentation/instrumentation_test_instance.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698