OLD | NEW |
---|---|
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 """ Subclass for all slave-side ChromeOS build steps. """ | 5 """ Subclass for all slave-side ChromeOS build steps. """ |
6 | 6 |
7 | 7 |
8 from build_step import BuildStep, DeviceDirs | 8 from build_step import BuildStep, DeviceDirs |
9 from utils import gs_utils | 9 from utils import gs_utils |
10 from utils import ssh_utils | 10 from utils import ssh_utils |
(...skipping 28 matching lines...) Expand all Loading... | |
39 def _CreateDirectoryOnDevice(self, directory): | 39 def _CreateDirectoryOnDevice(self, directory): |
40 """ Create a directory on the device. """ | 40 """ Create a directory on the device. """ |
41 ssh_utils.RunSSH(self._ssh_username, self._ssh_host, self._ssh_port, | 41 ssh_utils.RunSSH(self._ssh_username, self._ssh_host, self._ssh_port, |
42 ['mkdir', '-p', directory]) | 42 ['mkdir', '-p', directory]) |
43 | 43 |
44 def PushFileToDevice(self, src, dst): | 44 def PushFileToDevice(self, src, dst): |
45 """ Overrides build_step.PushFileToDevice() """ | 45 """ Overrides build_step.PushFileToDevice() """ |
46 ssh_utils.PutSCP(src, dst, self._ssh_username, self._ssh_host, | 46 ssh_utils.PutSCP(src, dst, self._ssh_username, self._ssh_host, |
47 self._ssh_port) | 47 self._ssh_port) |
48 | 48 |
49 def DevicePathExists(self, path): | |
50 """ Overrides build_step.DevicePathExists() """ | |
51 return posixpath.exists(path) | |
borenet
2013/06/26 18:47:31
Again, this won't work because it's on the host si
scroggo
2013/06/26 20:07:08
Done.
| |
52 | |
49 def DevicePathJoin(self, *args): | 53 def DevicePathJoin(self, *args): |
50 """ Overrides build_step.DevicePathJoin() """ | 54 """ Overrides build_step.DevicePathJoin() """ |
51 return posixpath.sep.join(args) | 55 return posixpath.sep.join(args) |
52 | 56 |
53 def CreateCleanDirectory(self, directory): | 57 def CreateCleanDirectory(self, directory): |
54 self._RemoveDirectoryOnDevice(directory) | 58 self._RemoveDirectoryOnDevice(directory) |
55 self._CreateDirectoryOnDevice(directory) | 59 self._CreateDirectoryOnDevice(directory) |
56 | 60 |
57 def CopyDirectoryContentsToDevice(self, host_dir, device_dir): | 61 def CopyDirectoryContentsToDevice(self, host_dir, device_dir): |
58 """ Copy the contents of a host-side directory to a clean directory on the | 62 """ Copy the contents of a host-side directory to a clean directory on the |
(...skipping 13 matching lines...) Expand all Loading... | |
72 def __init__(self, args, **kwargs): | 76 def __init__(self, args, **kwargs): |
73 self._ssh_host = args['ssh_host'] | 77 self._ssh_host = args['ssh_host'] |
74 self._ssh_port = args['ssh_port'] | 78 self._ssh_port = args['ssh_port'] |
75 self._ssh_username = 'root' | 79 self._ssh_username = 'root' |
76 super(ChromeOSBuildStep, self).__init__(args=args, **kwargs) | 80 super(ChromeOSBuildStep, self).__init__(args=args, **kwargs) |
77 prefix = '/usr/local/skiabot/skia_' | 81 prefix = '/usr/local/skiabot/skia_' |
78 self._device_dirs = DeviceDirs(perf_data_dir=prefix + 'perf', | 82 self._device_dirs = DeviceDirs(perf_data_dir=prefix + 'perf', |
79 gm_actual_dir=prefix + 'gm_actual', | 83 gm_actual_dir=prefix + 'gm_actual', |
80 gm_expected_dir=prefix + 'gm_expected', | 84 gm_expected_dir=prefix + 'gm_expected', |
81 resource_dir=prefix + 'resources', | 85 resource_dir=prefix + 'resources', |
86 skimage_in_dir=prefix + 'skimage_in', | |
87 skimage_expected_dir=(prefix | |
88 + 'skimage_expected'), | |
89 skimage_out_dir=prefix + 'skimage_out', | |
82 skp_dir=prefix + 'skp', | 90 skp_dir=prefix + 'skp', |
83 skp_perf_dir=prefix + 'skp_perf', | 91 skp_perf_dir=prefix + 'skp_perf', |
84 skp_out_dir=prefix + 'skp_out', | 92 skp_out_dir=prefix + 'skp_out', |
85 tmp_dir=prefix + 'tmp_dir') | 93 tmp_dir=prefix + 'tmp_dir') |
OLD | NEW |