diff options
author | Vadim Tryshev <vadimt@google.com> | 2019-08-14 17:25:22 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-08-14 17:25:22 +0000 |
commit | b13fdc8d6f05d8d732ee4382f8cbbaf7e84f43b9 (patch) | |
tree | ebcd56a426172ca2231b9c22967e81c9f5b06419 /tests | |
parent | f3dac0ef130145889898673fa5a41d436bf9dc54 (diff) | |
parent | cc5b17b351503e53be177b41ae4b7dfdb1c8ce7c (diff) | |
download | android_packages_apps_Trebuchet-b13fdc8d6f05d8d732ee4382f8cbbaf7e84f43b9.tar.gz android_packages_apps_Trebuchet-b13fdc8d6f05d8d732ee4382f8cbbaf7e84f43b9.tar.bz2 android_packages_apps_Trebuchet-b13fdc8d6f05d8d732ee4382f8cbbaf7e84f43b9.zip |
Merge "Improving screenshot path" into ub-launcher3-qt-qpr1-dev
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/android/launcher3/util/rule/FailureWatcher.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/src/com/android/launcher3/util/rule/FailureWatcher.java b/tests/src/com/android/launcher3/util/rule/FailureWatcher.java index eef2f24ba..e7a2bcab6 100644 --- a/tests/src/com/android/launcher3/util/rule/FailureWatcher.java +++ b/tests/src/com/android/launcher3/util/rule/FailureWatcher.java @@ -15,7 +15,6 @@ import java.io.IOException; public class FailureWatcher extends TestWatcher { private static final String TAG = "FailureWatcher"; - private static int sScreenshotCount = 0; final private UiDevice mDevice; public FailureWatcher(UiDevice device) { @@ -40,7 +39,8 @@ public class FailureWatcher extends TestWatcher { protected void failed(Throwable e, Description description) { if (mDevice == null) return; final String pathname = getInstrumentation().getTargetContext(). - getFilesDir().getPath() + "/TaplTestScreenshot" + sScreenshotCount++ + ".png"; + getFilesDir().getPath() + "/TestScreenshot-" + description.getMethodName() + + ".png"; Log.e(TAG, "Failed test " + description.getMethodName() + ", screenshot will be saved to " + pathname + ", track trace is below, UI object dump is further below:\n" + |