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

Side by Side Diff: build/android/pylib/base/base_setup.py

Issue 1167693002: remove stale test data on the device (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
OLDNEW
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
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)])
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/device/device_utils.py » ('j') | build/android/pylib/device/device_utils.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698