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

Side by Side Diff: build/android/pylib/gtest/test_package_apk.py

Issue 1067853005: [Android] Update more GN paths related to testing/android/ move. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/config/android/rules.gni » ('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 (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 """Defines TestPackageApk to help run APK-based native tests.""" 5 """Defines TestPackageApk to help run APK-based native tests."""
6 # pylint: disable=W0212 6 # pylint: disable=W0212
7 7
8 import logging 8 import logging
9 import os 9 import os
10 import shlex 10 import shlex
(...skipping 28 matching lines...) Expand all
39 constants.GetOutDirectory(), '%s_apk' % suite_name, 39 constants.GetOutDirectory(), '%s_apk' % suite_name,
40 '%s-debug.apk' % suite_name) 40 '%s-debug.apk' % suite_name)
41 self._package_info = constants.PACKAGE_INFO['gtest'] 41 self._package_info = constants.PACKAGE_INFO['gtest']
42 42
43 def _CreateCommandLineFileOnDevice(self, device, options): 43 def _CreateCommandLineFileOnDevice(self, device, options):
44 device.WriteFile(self._package_info.cmdline_file, 44 device.WriteFile(self._package_info.cmdline_file,
45 self.suite_name + ' ' + options) 45 self.suite_name + ' ' + options)
46 46
47 def _GetFifo(self): 47 def _GetFifo(self):
48 # The test.fifo path is determined by: 48 # The test.fifo path is determined by:
49 # testing/android/java/src/org/chromium/native_test/ 49 # testing/android/native_test/java/src/org/chromium/native_test/
50 # ChromeNativeTestActivity.java and 50 # ChromeNativeTestActivity.java and
51 # testing/android/native_test_launcher.cc 51 # testing/android/native_test_launcher.cc
52 return '/data/data/' + self._package_info.package + '/files/test.fifo' 52 return '/data/data/' + self._package_info.package + '/files/test.fifo'
53 53
54 def _ClearFifo(self, device): 54 def _ClearFifo(self, device):
55 device.RunShellCommand('rm -f ' + self._GetFifo()) 55 device.RunShellCommand('rm -f ' + self._GetFifo())
56 56
57 def _WatchFifo(self, device, timeout, logfile=None): 57 def _WatchFifo(self, device, timeout, logfile=None):
58 for i in range(100): 58 for i in range(100):
59 if device.FileExists(self._GetFifo()): 59 if device.FileExists(self._GetFifo()):
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 self._StartActivity(device, force_stop=False) 125 self._StartActivity(device, force_stop=False)
126 finally: 126 finally:
127 self.tool.CleanUpEnvironment() 127 self.tool.CleanUpEnvironment()
128 logfile = android_commands.NewLineNormalizer(sys.stdout) 128 logfile = android_commands.NewLineNormalizer(sys.stdout)
129 return self._WatchFifo(device, timeout=10, logfile=logfile) 129 return self._WatchFifo(device, timeout=10, logfile=logfile)
130 130
131 #override 131 #override
132 def Install(self, device): 132 def Install(self, device):
133 self.tool.CopyFiles(device) 133 self.tool.CopyFiles(device)
134 device.Install(self.suite_path) 134 device.Install(self.suite_path)
OLDNEW
« no previous file with comments | « no previous file | build/config/android/rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698