Commit 15dbb711 authored by Torne (Richard Coles)'s avatar Torne (Richard Coles) Committed by Commit Bot

Try to fix ProcessSkiaGoldRenderTestResults.

The function uses adb pull to fetch a directory, and relies on being
able to do "adb pull /foo/src /existing/dir" and get a directory
"/existing/dir/src" containing the files from "/foo/src".

The adb pull helper checks that the pull succeeded by seeing if the
destination path exists after the pull, but since the destination is an
existing host directory this check always passes no matter what happened
in the pull.

Append the actual directory name we're interested in copying to the
destination, so that the check will work as expected; this way if the
pull doesn't work we will fail during the pull instead of failing when
we do os.listdir() subsequently.

Bug: 1106750
Change-Id: I73b4966cde926f756d5e6774d73b1bf27adaacf0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2308031Reviewed-by: default avatarBrian Sheedy <bsheedy@chromium.org>
Reviewed-by: default avatarTibor Goldschwendt <tiborg@chromium.org>
Commit-Queue: Richard Coles <torne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#790094}
parent 9472cbe8
......@@ -994,8 +994,8 @@ class LocalDeviceInstrumentationTestRun(
# Pull everything at once instead of pulling individually, as it's
# slightly faster since each command over adb has some overhead compared
# to doing the same thing locally.
device.PullFile(gold_dir, host_dir)
host_dir = os.path.join(host_dir, _DEVICE_GOLD_DIR)
device.PullFile(gold_dir, host_dir)
for image_name in os.listdir(host_dir):
if not image_name.endswith('.png'):
continue
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment