Home
last modified time | relevance | path

Searched refs:parser (Results 1 – 25 of 145) sorted by relevance

123456

/tools/loganalysis/tests/src/com/android/loganalysis/
DUnitTests.java33 import com.android.loganalysis.parser.AbstractSectionParserTest;
34 import com.android.loganalysis.parser.ActivityServiceParserTest;
35 import com.android.loganalysis.parser.AnrParserTest;
36 import com.android.loganalysis.parser.BatteryDischargeStatsInfoParserTest;
37 import com.android.loganalysis.parser.BatteryStatsDetailedInfoParserTest;
38 import com.android.loganalysis.parser.BatteryStatsSummaryInfoParserTest;
39 import com.android.loganalysis.parser.BatteryUsageParserTest;
40 import com.android.loganalysis.parser.BugreportParserTest;
41 import com.android.loganalysis.parser.CompactMemInfoParserTest;
42 import com.android.loganalysis.parser.CpuInfoParserTest;
[all …]
DFuncTests.java18 import com.android.loganalysis.parser.BugreportParserFuncTest;
19 import com.android.loganalysis.parser.LogcatParserFuncTest;
20 import com.android.loganalysis.parser.MonkeyLogParserFuncTest;
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/testdefs/
DXmlDefsParserTest.java60 XmlDefsParser parser = new XmlDefsParser(); in testParseSingleDef() local
61 parser.parse(getStringAsStream(TEST_DATA)); in testParseSingleDef()
62 assertEquals(1, parser.getTestDefs().size()); in testParseSingleDef()
63 InstrumentationTestDef def = parser.getTestDefs().iterator().next(); in testParseSingleDef()
76 XmlDefsParser parser = new XmlDefsParser(); in testParseNonContinuous() local
77 parser.parse(getStringAsStream(NON_CONTINUOUS_TEST_DATA)); in testParseNonContinuous()
78 assertEquals(1, parser.getTestDefs().size()); in testParseNonContinuous()
79 InstrumentationTestDef def = parser.getTestDefs().iterator().next(); in testParseNonContinuous()
87 XmlDefsParser parser = new XmlDefsParser(); in testParseFaleContinuous() local
88 parser.parse(getStringAsStream(FALSE_CONTINUOUS_TEST_DATA)); in testParseFaleContinuous()
[all …]
/tools/loganalysis/tests/src/com/android/loganalysis/util/config/
DArgsOptionParserTest.java204 ArgsOptionParser parser = new ArgsOptionParser(object); in testOptionUpdateRule_greater() local
208 parser.parse(new String[] {"--default", big, "--first", big, "--last", big, in testOptionUpdateRule_greater()
223 ArgsOptionParser parser = new ArgsOptionParser(object); in testOptionUpdateRule_lesser() local
227 parser.parse(new String[] {"--default", small, "--first", small, "--last", small, in testOptionUpdateRule_lesser()
242 ArgsOptionParser parser = new ArgsOptionParser(object); in testOptionUpdateRule_immutable() local
246 parser.parse(new String[] {"--immutable", update}); in testOptionUpdateRule_immutable()
253 parser.parse(new String[] {"--null-immutable", update}); in testOptionUpdateRule_immutable()
257 parser.parse(new String[] {"--null-immutable", update}); in testOptionUpdateRule_immutable()
269 ArgsOptionParser parser = new ArgsOptionParser(source); in testNonGlobalOptionSource_alias() local
272 parser.parse(new String[] {"--ngos:option"}); in testNonGlobalOptionSource_alias()
[all …]
/tools/test/connectivity/acts/framework/acts/bin/
Dmonsoon.py61 parser = argparse.ArgumentParser(description=("This is a python utility " variable
63 parser.add_argument("--status", action="store_true",
65 parser.add_argument("-avg", "--avg", type=int, default=0,
67 parser.add_argument("-v", "--voltage", type=float,
69 parser.add_argument("-c", "--current", type=float,
71 parser.add_argument("-sc", "--startcurrent", type=float,
73 parser.add_argument("-usb", "--usbpassthrough", choices=("on", "off",
75 parser.add_argument("-sp", "--samples", type=int,
77 parser.add_argument("-hz", "--hz", type=int,
79 parser.add_argument("-d", "--device", help="Use this /dev/ttyACM... file.")
[all …]
Dact.py150 parser = argparse.ArgumentParser(
153 parser.add_argument(
161 parser.add_argument(
168 parser.add_argument(
174 parser.add_argument(
183 parser.add_argument(
190 parser.add_argument(
196 parser.add_argument(
204 group = parser.add_mutually_exclusive_group(required=True)
220 parser.add_argument(
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/config/
DArgsOptionParserTest.java222 ArgsOptionParser parser = new ArgsOptionParser(object); in testOptionUpdateRule_greater() local
226 parser.parse(new String[] {"--default", big, "--first", big, "--last", big, in testOptionUpdateRule_greater()
241 ArgsOptionParser parser = new ArgsOptionParser(object); in testOptionUpdateRule_lesser() local
245 parser.parse(new String[] {"--default", small, "--first", small, "--last", small, in testOptionUpdateRule_lesser()
260 ArgsOptionParser parser = new ArgsOptionParser(object); in testOptionUpdateRule_immutable() local
264 parser.parse(new String[] {"--immutable", update}); in testOptionUpdateRule_immutable()
271 parser.parse(new String[] {"--null-immutable", update}); in testOptionUpdateRule_immutable()
275 parser.parse(new String[] {"--null-immutable", update}); in testOptionUpdateRule_immutable()
287 ArgsOptionParser parser = new ArgsOptionParser(source); in testNonGlobalOptionSource_alias() local
290 parser.parse(new String[] {"--ngos:option"}); in testNonGlobalOptionSource_alias()
[all …]
DOptionSetterTest.java328 OptionSetter parser = new OptionSetter(object1, object2); in testOptionSetter_sharedEnumMap() local
329 parser.setOptionValue("enumMap", key, value); in testOptionSetter_sharedEnumMap()
355 OptionSetter parser = new OptionSetter(object1, object2); in testOptionSetter_sharedEnumCollection() local
356 parser.setOptionValue("enumCollection", value); in testOptionSetter_sharedEnumCollection()
481 OptionSetter parser = new OptionSetter(new AllTypesOptionSource()); in testIsBooleanOption_unknown() local
483 parser.isBooleanOption("unknown"); in testIsBooleanOption_unknown()
494 OptionSetter parser = new OptionSetter(new AllTypesOptionSource()); in testIsBooleanOption_true() local
495 assertTrue(parser.isBooleanOption("boolean")); in testIsBooleanOption_true()
503 OptionSetter parser = new OptionSetter(new AllTypesOptionSource()); in testIsBooleanOption_objTrue() local
504 assertTrue(parser.isBooleanOption("booleanObj")); in testIsBooleanOption_objTrue()
[all …]
/tools/tradefederation/core/src/com/android/tradefed/result/suite/
DXmlSuiteResultFormatter.java133 public void parseSuiteAttributes(XmlPullParser parser, IInvocationContext context) in parseSuiteAttributes() argument
159 public void parseBuildInfoAttributes(XmlPullParser parser, IInvocationContext context) in parseBuildInfoAttributes() argument
404 XmlPullParser parser = factory.newPullParser(); in parseResults() local
405 parser.setInput(new FileReader(resultFile)); in parseResults()
407 parser.nextTag(); in parseResults()
408 parser.require(XmlPullParser.START_TAG, NS, RESULT_TAG); in parseResults()
409 invocation.startTime = (Long.valueOf(parser.getAttributeValue(NS, START_TIME_ATTR))); in parseResults()
410 invocation.endTime = (Long.valueOf(parser.getAttributeValue(NS, END_TIME_ATTR))); in parseResults()
412 COMMAND_LINE_ARGS, parser.getAttributeValue(NS, COMMAND_LINE_ARGS)); in parseResults()
413 parseSuiteAttributes(parser, context); in parseResults()
[all …]
/tools/test/connectivity/tools/lab/
Dmain.py142 parser = argparse.ArgumentParser(
146 parser.add_argument(
152 parser.add_argument(
158 parser.add_argument(
164 parser.add_argument(
170 parser.add_argument(
176 parser.add_argument(
182 parser.add_argument(
190 parser.add_argument(
196 parser.add_argument(
[all …]
/tools/acloud/public/
Dacloud_common.py22 def AddCommonArguments(parser): argument
28 parser.add_argument("--email",
32 parser.add_argument(
39 parser.add_argument("--report_file",
45 parser.add_argument("--log_file",
50 parser.add_argument("-v",
55 parser.add_argument("-vv",
/tools/apksig/src/main/java/com/android/apksig/apk/
DApkUtils.java345 AndroidBinXmlParser parser = new AndroidBinXmlParser(androidManifestContents); in getMinSdkVersionFromBinaryAndroidManifest() local
346 int eventType = parser.getEventType(); in getMinSdkVersionFromBinaryAndroidManifest()
349 && (parser.getDepth() == 2) in getMinSdkVersionFromBinaryAndroidManifest()
350 && ("uses-sdk".equals(parser.getName())) in getMinSdkVersionFromBinaryAndroidManifest()
351 && (parser.getNamespace().isEmpty())) { in getMinSdkVersionFromBinaryAndroidManifest()
354 for (int i = 0; i < parser.getAttributeCount(); i++) { in getMinSdkVersionFromBinaryAndroidManifest()
355 if (parser.getAttributeNameResourceId(i) == MIN_SDK_VERSION_ATTR_ID) { in getMinSdkVersionFromBinaryAndroidManifest()
356 int valueType = parser.getAttributeValueType(i); in getMinSdkVersionFromBinaryAndroidManifest()
359 minSdkVersion = parser.getAttributeIntValue(i); in getMinSdkVersionFromBinaryAndroidManifest()
364 parser.getAttributeStringValue(i)); in getMinSdkVersionFromBinaryAndroidManifest()
[all …]
/tools/repohooks/tools/
Dgoogle-java-format.py40 parser = argparse.ArgumentParser(description=__doc__)
41 parser.add_argument('--google-java-format', default='google-java-format',
43 parser.add_argument('--google-java-format-diff',
46 parser.add_argument('--fix', action='store_true',
48 parser.add_argument('--commit', type=str, default='HEAD',
53 parser.add_argument('--sort-imports', action='store_true',
55 parser.add_argument('files', nargs='*',
58 return parser
63 parser = get_parser()
64 opts = parser.parse_args(argv)
Dclang-format.py44 parser = argparse.ArgumentParser(description=__doc__)
45 parser.add_argument('--clang-format', default='clang-format',
47 parser.add_argument('--git-clang-format', default='git-clang-format',
49 parser.add_argument('--style', metavar='STYLE', type=str,
51 parser.add_argument('--extensions', metavar='EXTENSIONS', type=str,
54 parser.add_argument('--fix', action='store_true',
57 scope = parser.add_mutually_exclusive_group(required=True)
64 parser.add_argument('files', type=str, nargs='*',
67 return parser
72 parser = get_parser()
[all …]
Dpylint.py33 parser = argparse.ArgumentParser(description=__doc__)
34 parser.add_argument('--init-hook', help='Init hook commands to run.')
35 parser.add_argument('--executable-path',
38 parser.add_argument('--no-rcfile',
42 parser.add_argument('files', nargs='+')
43 return parser
48 parser = get_parser()
49 opts, unknown = parser.parse_known_args(argv)
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/
DGTestListTestParserTest.java51 GTestListTestParser parser = new GTestListTestParser(TEST_MODULE_NAME, mockRunListener); in testParseSimpleList() local
52 parser.processNewLines(contents); in testParseSimpleList()
53 parser.flush(); in testParseSimpleList()
55 verifyTestDescriptions(parser.mTests, 1); in testParseSimpleList()
77 GTestListTestParser parser = new GTestListTestParser(TEST_MODULE_NAME, mockRunListener); in testParseMultiClassList() local
78 parser.processNewLines(contents); in testParseMultiClassList()
79 parser.flush(); in testParseMultiClassList()
81 verifyTestDescriptions(parser.mTests, 29); in testParseMultiClassList()
91 GTestListTestParser parser = new GTestListTestParser(TEST_MODULE_NAME, mockRunListener); in testParseMalformedList() local
93 parser.processNewLines(contents); in testParseMalformedList()
[all …]
/tools/loganalysis/src/com/android/loganalysis/parser/
DAbstractSectionParser.java16 package com.android.loganalysis.parser;
47 protected void addSectionParser(IParser parser, String pattern) { in addSectionParser() argument
48 if (parser == null) { in addSectionParser()
54 mSectionTrie.put(parser, pattern); in addSectionParser()
92 protected IItem getSection(IParser parser) { in getSection() argument
93 return mSections.get(parser); in getSection()
101 protected void setParser(IParser parser) { in setParser() argument
102 mCurrentParser = parser; in setParser()
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/
DFlashingResourcesParserTest.java109 IFlashingResourcesParser parser = new FlashingResourcesParser(reader); in testParseAndroidInfo_boardAndProduct() local
110 Collection<String> reqBoards = parser.getRequiredBoards(); in testParseAndroidInfo_boardAndProduct()
124 IFlashingResourcesParser parser = new FlashingResourcesParser(reader); in testParseAndroidInfo_onlyBoard() local
125 Collection<String> reqBoards = parser.getRequiredBoards(); in testParseAndroidInfo_onlyBoard()
142 IFlashingResourcesParser parser = new FlashingResourcesParser(reader); in testParseAndroidInfo_onlyProduct() local
143 Collection<String> reqBoards = parser.getRequiredBoards(); in testParseAndroidInfo_onlyProduct()
202 IFlashingResourcesParser parser = new FlashingResourcesParser(reader); in testRequireForProduct_api() local
203 assertEquals("1234", parser.getRequiredImageVersion("version-bootloader")); in testRequireForProduct_api()
204 assertEquals("1234", parser.getRequiredImageVersion("version-bootloader", null)); in testRequireForProduct_api()
205 assertEquals("1234", parser.getRequiredImageVersion("version-bootloader", "alpha")); in testRequireForProduct_api()
[all …]
/tools/tradefederation/core/atest/
Datest.py283 parser = argparse.ArgumentParser(
287 parser.add_argument('tests', nargs='*', help='Tests to build and/or run.')
288 parser.add_argument('-b', '--build', action='append_const', dest='steps',
290 parser.add_argument('-i', '--install', action='append_const', dest='steps',
292 parser.add_argument('-t', '--test', action='append_const', dest='steps',
298 parser.add_argument('-s', '--serial',
300 parser.add_argument('-d', '--disable-teardown', action='store_true',
302 parser.add_argument('-m', REBUILD_MODULE_INFO_FLAG, action='store_true',
306 parser.add_argument('-w', '--wait-for-debugger', action='store_true',
309 parser.add_argument('-v', '--verbose', action='store_true',
[all …]
/tools/tradefederation/contrib/src/com/android/media/tests/
DCameraPerformanceTest.java157 CtsResultParserBase parser; in parseResult() local
165 parser = new CtsXmlResultParser(); in parseResult()
167 parser = new CtsDelimitedResultParser(); in parseResult()
177 Map<String, String> testKpis = parser.parse(testResult, testMethod); in parseResult()
184 parser.clear(); in parseResult()
442 XmlPullParser parser = factory.newPullParser(); in parse() local
443 parser.setInput(new ByteArrayInputStream(result.getBytes(ENCODING)), ENCODING); in parse()
444 parser.nextTag(); in parse()
445 parse(parser); in parse()
459 private void parse(XmlPullParser parser) throws XmlPullParserException, IOException { in parse() argument
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/util/
DEmmaXmlReporterParserTest.java78 EmmaXmlReportParser parser = new EmmaXmlReportParser(); in testNormalParsing() local
79 parser.parseXmlFile(mXMLTestFile); in testNormalParsing()
80 Map<String, String> expected = parser.getSummaryMetrics(); in testNormalParsing()
92 EmmaXmlReportParser parser = new EmmaXmlReportParser(); in testNormalParsingData() local
93 parser.parseXmlFile(mXMLTestFile); in testNormalParsingData()
94 Map<String, String[]> expected = parser.getDataMetrics(); in testNormalParsingData()
/tools/tradefederation/core/src/com/android/tradefed/result/ddmlib/
DDefaultRemoteAndroidTestRunner.java40 InstrumentationResultParser parser = super.createParser(runName, listeners); in createParser() local
42 parser.setTrimLine(false); in createParser()
43 return parser; in createParser()
/tools/loganalysis/tests/src/com/android/loganalysis/parser/
DAbstractSectionParserTest.java16 package com.android.loganalysis.parser;
79 FakeBlockParser parser = new FakeBlockParser(line); in testSwitchParsers() local
80 mParser.addSectionParser(parser, String.format(linePattern, i)); in testSwitchParsers()
81 parsers[i] = parser; in testSwitchParsers()
/tools/tradefederation/core/src/com/android/tradefed/util/xml/
DAbstractXmlParser.java58 SAXParser parser; in parse() local
59 parser = parserFactory.newSAXParser(); in parse()
62 parser.parse(new InputSource(xmlInput), handler); in parse()
/tools/acloud/public/acloud_kernel/
Dacloud_kernel.py44 parser = argparse.ArgumentParser()
45 subparsers = parser.add_subparsers()
65 return parser.parse_args(args)

123456