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

Commit 630a48f9 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "Remind ourselves why @IgnoreUnderRavenwood." into main

parents 563c9b3c 36b2f512
Loading
Loading
Loading
Loading
+20 −2
Original line number Diff line number Diff line
@@ -22,12 +22,30 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY
 * QUESTIONS ABOUT IT.
 * Test methods marked with this annotation are quietly ignored when running under a Ravenwood test
 * environment. The test continues to execute normally under all other non-Ravenwood test
 * environments.
 *
 * This annotation only takes effect when the containing class has a {@code
 * RavenwoodRule} configured. Ignoring is accomplished by throwing an {@code org.junit
 * .AssumptionViolatedException} which test infrastructure treats as being ignored.
 *
 * Developers are encouraged to use either the {@code blockedBy} and/or {@code reason} arguments
 * to document why a test is being ignored, to aid in future audits of tests that are candidates
 * to be enabled.
 *
 * @hide
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface IgnoreUnderRavenwood {
    /**
     * One or more classes that aren't yet supported by Ravenwood, which this test depends on.
     */
    Class<?>[] blockedBy() default {};

    /**
     * General free-form description of why this test is being ignored.
     */
    String reason() default "";
}