summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorvadimt <vadimt@google.com>2019-08-12 14:46:48 -0700
committervadimt <vadimt@google.com>2019-08-13 17:49:15 -0700
commitcc5b17b351503e53be177b41ae4b7dfdb1c8ce7c (patch)
tree4383657616ee2a86c5894a650cedd271477572a4 /tests
parente4061fc931cb8bc50306a76e617761936a74b97f (diff)
downloadandroid_packages_apps_Trebuchet-cc5b17b351503e53be177b41ae4b7dfdb1c8ce7c.tar.gz
android_packages_apps_Trebuchet-cc5b17b351503e53be177b41ae4b7dfdb1c8ce7c.tar.bz2
android_packages_apps_Trebuchet-cc5b17b351503e53be177b41ae4b7dfdb1c8ce7c.zip
Improving screenshot path
Change-Id: If61bbf0bbc8ace31142bc0e2d598d72ce48de360
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/android/launcher3/util/rule/FailureWatcher.java4
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" +