OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """ Prepare runtime resources that are needed by Test builders but not | 6 """ Prepare runtime resources that are needed by Test builders but not |
7 Bench builders. """ | 7 Bench builders. """ |
8 | 8 |
9 from build_step import BuildStep | 9 from build_step import BuildStep |
| 10 from utils import file_utils |
10 from utils import shell_utils | 11 from utils import shell_utils |
11 import build_step | 12 import build_step |
12 import os | 13 import os |
13 import shutil | 14 import shutil |
14 import sys | 15 import sys |
15 import tempfile | 16 import tempfile |
16 | 17 |
17 | 18 |
18 class PreRender(BuildStep): | 19 class PreRender(BuildStep): |
19 | 20 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 device_gm_expectations_path) | 109 device_gm_expectations_path) |
109 shutil.rmtree(tempdir) | 110 shutil.rmtree(tempdir) |
110 | 111 |
111 # Prepare directory to hold GM actuals. | 112 # Prepare directory to hold GM actuals. |
112 if os.path.exists(self._gm_actual_dir): | 113 if os.path.exists(self._gm_actual_dir): |
113 print 'Removing %s' % self._gm_actual_dir | 114 print 'Removing %s' % self._gm_actual_dir |
114 shutil.rmtree(self._gm_actual_dir) | 115 shutil.rmtree(self._gm_actual_dir) |
115 print 'Creating %s' % self._gm_actual_dir | 116 print 'Creating %s' % self._gm_actual_dir |
116 os.makedirs(self._gm_actual_dir) | 117 os.makedirs(self._gm_actual_dir) |
117 | 118 |
| 119 # Copy expectations file and images to decode in skimage to device. |
| 120 self.CopyDirectoryContentsToDevice(self._skimage_expected_dir, |
| 121 self._device_dirs.SKImageExpectedDir()) |
| 122 |
| 123 self.CopyDirectoryContentsToDevice(self._skimage_in_dir, |
| 124 self._device_dirs.SKImageInDir()) |
| 125 |
| 126 # Create an out directory locally for android builds, so the files can be |
| 127 # copied back to the master |
| 128 file_utils.CreateCleanLocalDir(self._skimage_out_dir) |
| 129 |
| 130 # Create a directory for the output of skimage |
| 131 self.CreateCleanDirectory(self._device_dirs.SKImageOutDir()) |
| 132 |
118 | 133 |
119 if '__main__' == __name__: | 134 if '__main__' == __name__: |
120 sys.exit(BuildStep.RunBuildStep(PreRender)) | 135 sys.exit(BuildStep.RunBuildStep(PreRender)) |
OLD | NEW |