Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 184fa593 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Improving diagnostics for tests ignored due to @Stability annotation...

Merge "Improving diagnostics for tests ignored due to @Stability annotation Now they will be shown as ignored, not as passed." into udc-qpr-dev
parents 57065929 74eddc54
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@ package com.android.launcher3.util.rule;

import static androidx.test.InstrumentationRegistry.getInstrumentation;

import static org.junit.Assume.assumeTrue;

import android.content.pm.PackageManager;
import android.os.Build;
import android.util.Log;
@@ -69,12 +71,9 @@ public class TestStabilityRule implements TestRule {
            return new Statement() {
                @Override
                public void evaluate() throws Throwable {
                    if ((stability.flavors() & getRunFlavor()) != 0) {
                        Log.d(TAG, "Running " + description.getDisplayName());
                    assumeTrue("Ignoring the test due to @Stability annotation",
                            (stability.flavors() & getRunFlavor()) != 0);
                    base.evaluate();
                    } else {
                        Log.d(TAG, "Skipping " + description.getDisplayName());
                    }
                }
            };
        } else {