Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions scripts/hellocodenameone/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,12 @@ Renderer variants and CPU architectures intentionally remain separate so a
regression cannot be hidden by a combined platform result.

The feature contract lives in
`docs/website/data/port_status.json`. Every test registered in
`Cn1ssDeviceRunner`, including tests installed through `addTest()`, must appear
under exactly one feature. Every committed CN1SS golden filename must map back
`docs/website/data/port_status.json`. Every test in
`Cn1ssDeviceRunner.DEFAULT_TEST_CLASSES`, and every test installed through
`addTest()`, must appear under exactly one feature. JavaSE-only visual reference
probes live separately in `JAVASE_REFERENCE_TEST_CLASSES`: they remain available
to filtered simulator runs but are not portability tests and do not appear on
the public Port Status page. Every committed CN1SS golden filename must map back
to its producing test. Validate both rules from the repository root:

[source,shell]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ private static int testTimeoutMs(BaseTest testClass) {
new MorphTransitionScrubScreenshotTest(),
new MorphElementMorphScreenshotTest(),
new TabsAnimatedIndicatorScreenshotTest(),
new TabsLiquidGlassAnimationScreenshotTest(),
new PullToRefreshSpinnerScreenshotTest(),
new AnimateLayoutScreenshotTest(),
new AnimateHierarchyScreenshotTest(),
Expand Down Expand Up @@ -439,6 +438,14 @@ private static int testTimeoutMs(BaseTest testClass) {
new VideoIORoundTripTest()
};

// Visual probes used to compare the simulator renderer with native
// reference captures are not portability tests. Keep them available to a
// filtered JavaSE run without adding always-skipped rows to the public
// cross-port compliance contract.
private static final BaseTest[] JAVASE_REFERENCE_TEST_CLASSES = new BaseTest[]{
new TabsLiquidGlassAnimationScreenshotTest()
};

private static BaseTest prependedTest;

/// Index of the test that has consumed its one-shot silent-timeout retry
Expand All @@ -465,12 +472,26 @@ public void runSuite() {

private void runNextTest(int index) {
int offset = prependedTest != null ? 1 : 0;
int total = DEFAULT_TEST_CLASSES.length + offset;
boolean includeJavaSeReferences = "SE".equals(
Display.getInstance().getProperty("OS", ""));
int referenceCount = includeJavaSeReferences
? JAVASE_REFERENCE_TEST_CLASSES.length
: 0;
int total = DEFAULT_TEST_CLASSES.length + referenceCount + offset;
if (index >= total) {
finishSuite();
return;
}
BaseTest testClass = (offset == 1 && index == 0) ? prependedTest : DEFAULT_TEST_CLASSES[index - offset];
BaseTest testClass;
int suiteIndex = index - offset;
if (offset == 1 && index == 0) {
testClass = prependedTest;
} else if (suiteIndex < DEFAULT_TEST_CLASSES.length) {
testClass = DEFAULT_TEST_CLASSES[suiteIndex];
} else {
testClass = JAVASE_REFERENCE_TEST_CLASSES[
suiteIndex - DEFAULT_TEST_CLASSES.length];
}
String testName = testClass.getClass().getSimpleName();
if (!matchesFilter(testName)) {
// Optional subset run: -Dcn1ss.filter=<substr> or CN1SS_FILTER=<substr>
Expand Down
Loading