diff options
author | Dan Albert | 2017-05-19 12:22:51 -0500 |
---|---|---|
committer | android-build-merger | 2017-05-19 12:22:51 -0500 |
commit | b34b448bcd059602f33e9b5059d354d89dc8b74d (patch) | |
tree | cdade90ec366977d316a8641f81727c368f5734c | |
parent | b463a37a971176fe21f0d1de0823dc6bc074331a (diff) | |
parent | 222a69bc927cf0aa59d17988df3d678840043857 (diff) | |
download | platform-system-core-b34b448bcd059602f33e9b5059d354d89dc8b74d.tar.gz platform-system-core-b34b448bcd059602f33e9b5059d354d89dc8b74d.tar.xz platform-system-core-b34b448bcd059602f33e9b5059d354d89dc8b74d.zip |
Merge "Fix test following -p removal." am: 5e49fbc547 am: 3039d9d4fa
am: 222a69bc92
Change-Id: I9c64b7b9fba10e73f71a17337231973c7bb031b1
-rw-r--r-- | adb/test_device.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/adb/test_device.py b/adb/test_device.py index e44cc83f0..9ef467680 100644 --- a/adb/test_device.py +++ b/adb/test_device.py | |||
@@ -1144,10 +1144,16 @@ class FileOperationsTest(DeviceTest): | |||
1144 | temp_files = make_random_host_files(in_dir=full_dir_path, num_files=32) | 1144 | temp_files = make_random_host_files(in_dir=full_dir_path, num_files=32) |
1145 | 1145 | ||
1146 | # Clean up any trash on the device. | 1146 | # Clean up any trash on the device. |
1147 | device = adb.get_device(product=base_dir) | 1147 | device = adb.get_device() # pylint: disable=no-member |
1148 | device.shell(['rm', '-rf', self.DEVICE_TEMP_DIR]) | 1148 | device.shell(['rm', '-rf', self.DEVICE_TEMP_DIR]) |
1149 | 1149 | ||
1150 | old_product_out = os.environ.get('ANDROID_PRODUCT_OUT') | ||
1151 | os.environ['ANDROID_PRODUCT_OUT'] = base_dir | ||
1150 | device.sync('data') | 1152 | device.sync('data') |
1153 | if old_product_out is None: | ||
1154 | del os.environ['ANDROID_PRODUCT_OUT'] | ||
1155 | else: | ||
1156 | os.environ['ANDROID_PRODUCT_OUT'] = old_product_out | ||
1151 | 1157 | ||
1152 | # Confirm that every file on the device mirrors that on the host. | 1158 | # Confirm that every file on the device mirrors that on the host. |
1153 | for temp_file in temp_files: | 1159 | for temp_file in temp_files: |