summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Chen <yuzhechen@google.com>2023-03-01 14:08:19 -0800
committerJeff Chen <yuzhechen@google.com>2023-03-01 14:10:51 -0800
commit087bed73090f913e6e56bd481a1d92be497d760b (patch)
tree4b097f3ce56615bf08ecfb4cccef466f81d45b32
parent22eff5a0e9c5906466bea76abf1e57ca7198cd1e (diff)
downloadplatform_testing-087bed73090f913e6e56bd481a1d92be497d760b.tar.gz
Add a bugId field to @Platinum annotation.
Test: LaunchCameraFromLockScreen Bug: 270628073 Change-Id: I0bc27bec526a0dd227bf5801a536d77d398cc712
-rw-r--r--libraries/health/rules/src/android/platform/test/rule/PlatinumRule.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/libraries/health/rules/src/android/platform/test/rule/PlatinumRule.java b/libraries/health/rules/src/android/platform/test/rule/PlatinumRule.java
index f8bab42c1..78456cd6b 100644
--- a/libraries/health/rules/src/android/platform/test/rule/PlatinumRule.java
+++ b/libraries/health/rules/src/android/platform/test/rule/PlatinumRule.java
@@ -65,7 +65,7 @@ public class PlatinumRule implements TestRule {
}
// If the target IS listed in the annotation's parameter, this rule is not applicable.
- final boolean match = Arrays.asList(annotation.value().split(",")).contains(flavor);
+ final boolean match = Arrays.asList(annotation.devices().split(",")).contains(flavor);
if (match) return base;
// The test will be skipped upon start.
@@ -76,7 +76,7 @@ public class PlatinumRule implements TestRule {
"Skipping the test on target "
+ flavor
+ " which in not in "
- + annotation.value());
+ + annotation.devices());
}
};
}
@@ -84,6 +84,15 @@ public class PlatinumRule implements TestRule {
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
public @interface Platinum {
- String value();
+ /**
+ * Comma-separated list of devices. The annotated test only runs on listed devices in
+ * monitored test suites.
+ */
+ String devices();
+
+ /**
+ * The bug for tracking the device exclusion. -1 means that no bug is associated.
+ */
+ int bugId() default -1;
}
}