Merge "Improving diagnostics for tests ignored due to @Stability annotation Now they will be shown as ignored, not as passed." into udc-qpr-dev am: 184fa593ed
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24421530 Change-Id: If84d862d2344017a305ceff852074acce3f4c38a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -17,6 +17,8 @@ package com.android.launcher3.util.rule;
|
|||||||
|
|
||||||
import static androidx.test.InstrumentationRegistry.getInstrumentation;
|
import static androidx.test.InstrumentationRegistry.getInstrumentation;
|
||||||
|
|
||||||
|
import static org.junit.Assume.assumeTrue;
|
||||||
|
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@@ -69,12 +71,9 @@ public class TestStabilityRule implements TestRule {
|
|||||||
return new Statement() {
|
return new Statement() {
|
||||||
@Override
|
@Override
|
||||||
public void evaluate() throws Throwable {
|
public void evaluate() throws Throwable {
|
||||||
if ((stability.flavors() & getRunFlavor()) != 0) {
|
assumeTrue("Ignoring the test due to @Stability annotation",
|
||||||
Log.d(TAG, "Running " + description.getDisplayName());
|
(stability.flavors() & getRunFlavor()) != 0);
|
||||||
base.evaluate();
|
base.evaluate();
|
||||||
} else {
|
|
||||||
Log.d(TAG, "Skipping " + description.getDisplayName());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user