| OLD | NEW |
| 1 # Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2014 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 """Base script for doing test setup.""" | 5 """Base script for doing test setup.""" |
| 6 | 6 |
| 7 import logging | 7 import logging |
| 8 import os | 8 import os |
| 9 | 9 |
| 10 from pylib import constants | 10 from pylib import constants |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 # will be pushed to the device once we move to using time diff | 49 # will be pushed to the device once we move to using time diff |
| 50 # instead of md5sum. Perform a sanity check here. | 50 # instead of md5sum. Perform a sanity check here. |
| 51 i.VerifyHardlinks() | 51 i.VerifyHardlinks() |
| 52 i.PurgeExcluded(deps_exclusion_list) | 52 i.PurgeExcluded(deps_exclusion_list) |
| 53 i.MoveOutputDeps() | 53 i.MoveOutputDeps() |
| 54 | 54 |
| 55 | 55 |
| 56 def PushDataDeps(device, device_dir, test_options): | 56 def PushDataDeps(device, device_dir, test_options): |
| 57 valgrind_tools.PushFilesForTool(test_options.tool, device) | 57 valgrind_tools.PushFilesForTool(test_options.tool, device) |
| 58 if os.path.exists(constants.ISOLATE_DEPS_DIR): | 58 if os.path.exists(constants.ISOLATE_DEPS_DIR): |
| 59 device.PushChangedFiles([ | 59 if test_options.delete_stale_data: |
| 60 (os.path.join(constants.ISOLATE_DEPS_DIR, p), | 60 device.PushAndDeleteFiles(device_dir, [ |
| 61 '%s/%s' % (device_dir, p)) | 61 (os.path.join(constants.ISOLATE_DEPS_DIR, p), |
| 62 for p in os.listdir(constants.ISOLATE_DEPS_DIR)]) | 62 '%s/%s' % (device_dir, p)) |
| 63 for p in os.listdir(constants.ISOLATE_DEPS_DIR)]) |
| 64 else: |
| 65 device.PushChangedFiles([ |
| 66 (os.path.join(constants.ISOLATE_DEPS_DIR, p), |
| 67 '%s/%s' % (device_dir, p)) |
| 68 for p in os.listdir(constants.ISOLATE_DEPS_DIR)]) |
| OLD | NEW |