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

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

Issue 12212137: Android: further "user build" perf test automation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adds instrumentation perf Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « build/android/pylib/android_commands.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 """Runs the Java tests. See more information on run_instrumentation_tests.py.""" 5 """Runs the Java tests. See more information on run_instrumentation_tests.py."""
6 6
7 import fnmatch 7 import fnmatch
8 import logging 8 import logging
9 import os 9 import os
10 import re 10 import re
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 # If the test is set to run on a specific device type only (IE: only 358 # If the test is set to run on a specific device type only (IE: only
359 # tablet or phone) and it is being run on the wrong device, the test 359 # tablet or phone) and it is being run on the wrong device, the test
360 # just quits and does not do anything. The java test harness will still 360 # just quits and does not do anything. The java test harness will still
361 # print the appropriate annotation for us, but will add --NORUN-- for 361 # print the appropriate annotation for us, but will add --NORUN-- for
362 # us so we know to ignore the results. 362 # us so we know to ignore the results.
363 # The --NORUN-- tag is managed by MainActivityTestBase.java 363 # The --NORUN-- tag is managed by MainActivityTestBase.java
364 if regex.group(1) != '--NORUN--': 364 if regex.group(1) != '--NORUN--':
365 365
366 # Obtain the relevant perf data. The data is dumped to a 366 # Obtain the relevant perf data. The data is dumped to a
367 # JSON formatted file. 367 # JSON formatted file.
368 json_string = self.adb.GetFileContents( 368 json_string = self.adb.GetProtectedFileContents(
369 '/data/data/com.google.android.apps.chrome/files/PerfTestData.txt') 369 '/data/data/com.google.android.apps.chrome/files/PerfTestData.txt')
370 370
371 if json_string: 371 if json_string:
372 json_string = '\n'.join(json_string) 372 json_string = '\n'.join(json_string)
373 else: 373 else:
374 raise FatalTestException('Perf file does not exist or is empty') 374 raise FatalTestException('Perf file does not exist or is empty')
375 375
376 if self.save_perf_json: 376 if self.save_perf_json:
377 json_local_file = '/tmp/chromium-android-perf-json-' + raw_test_name 377 json_local_file = '/tmp/chromium-android-perf-json-' + raw_test_name
378 with open(json_local_file, 'w') as f: 378 with open(json_local_file, 'w') as f:
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 586
587 logging.info('Will run: %s', str(tests)) 587 logging.info('Will run: %s', str(tests))
588 588
589 if len(attached_devices) > 1 and (coverage or options.wait_for_debugger): 589 if len(attached_devices) > 1 and (coverage or options.wait_for_debugger):
590 logging.warning('Coverage / debugger can not be sharded, ' 590 logging.warning('Coverage / debugger can not be sharded, '
591 'using first available device') 591 'using first available device')
592 attached_devices = attached_devices[:1] 592 attached_devices = attached_devices[:1]
593 sharder = TestSharder(attached_devices, options, tests, apks) 593 sharder = TestSharder(attached_devices, options, tests, apks)
594 test_results = sharder.RunShardedTests() 594 test_results = sharder.RunShardedTests()
595 return test_results 595 return test_results
OLDNEW
« no previous file with comments | « build/android/pylib/android_commands.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698