Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Combine results of all the test batches. #37610

Merged
merged 10 commits into from
Nov 15, 2022
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
7 changes: 6 additions & 1 deletion lib/web_ui/dev/steps/run_tests_step.dart
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ class RunTestsStep implements PipelineStep {

final TestsByRenderer sortedTests = sortTestsByRenderer(testFiles);

bool testsPassed = true;

if (sortedTests.htmlTests.isNotEmpty) {
await _runTestBatch(
testFiles: sortedTests.htmlTests,
Expand All @@ -84,6 +86,7 @@ class RunTestsStep implements PipelineStep {
skiaClient: skiaClient,
overridePathToCanvasKit: overridePathToCanvasKit,
);
testsPassed &= io.exitCode == 0;
}

if (sortedTests.canvasKitTests.isNotEmpty) {
Expand All @@ -98,6 +101,7 @@ class RunTestsStep implements PipelineStep {
skiaClient: skiaClient,
overridePathToCanvasKit: overridePathToCanvasKit,
);
testsPassed &= io.exitCode == 0;
}

if (sortedTests.skwasmTests.isNotEmpty) {
Expand All @@ -112,11 +116,12 @@ class RunTestsStep implements PipelineStep {
skiaClient: skiaClient,
overridePathToCanvasKit: overridePathToCanvasKit,
);
testsPassed &= io.exitCode == 0;
}

await browserEnvironment.cleanup();

if (io.exitCode != 0) {
if (!testsPassed) {
throw ToolExit('Some tests failed');
}
}
Expand Down
3 changes: 2 additions & 1 deletion lib/web_ui/test/canvaskit/canvaskit_api_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1747,5 +1747,6 @@ half4 main(vec2 fragCoord) {
!.makeShader(<double>[1.0, 0.0, 0.0, 1.0]);

expect(shaderWithUniform, isNotNull);
});
// TODO(hterkelsen): https://github.com/flutter/flutter/issues/115327
}, skip: true);
}
5 changes: 3 additions & 2 deletions lib/web_ui/test/canvaskit/fragment_program_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ void testMain() {
await ui.webOnlyInitializePlatform();
});

group('FragmentProgram can be created from JSON IPLR bundle', () async {
test('FragmentProgram can be created from JSON IPLR bundle', () async {
final Uint8List data = utf8.encode(kJsonIPLR) as Uint8List;
final CkFragmentProgram program = await CkFragmentProgram.fromBytes('test', data);

Expand All @@ -207,5 +207,6 @@ void testMain() {
shader.setFloat(0, 5);
shader2.dispose();
expect(shader2.debugDisposed, true);
});
// TODO(hterkelsen): https://github.com/flutter/flutter/issues/115327
}, skip: true);
}
6 changes: 4 additions & 2 deletions lib/web_ui/test/canvaskit/path_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ void testMain() {
expect(iter2.moveNext(), isFalse);
expect(() => iter1.current, throwsRangeError);
expect(() => iter2.current, throwsRangeError);
});
// TODO(hterkelsen): https://github.com/flutter/flutter/issues/115327
}, skip: true);

test('CkPath.reset', () {
final ui.Path path = ui.Path();
Expand Down Expand Up @@ -170,7 +171,8 @@ void testMain() {
expect(measure0.extractPath(0, 15).getBounds(), const ui.Rect.fromLTRB(0, 0, 10, 5));
expect(measure1.contourIndex, 1);
expect(measure1.extractPath(0, 15).getBounds(), const ui.Rect.fromLTRB(20, 20, 30, 25));
});
// TODO(hterkelsen): https://github.com/flutter/flutter/issues/115327
}, skip: true);

test('Path.from', () {
const ui.Rect rect1 = ui.Rect.fromLTRB(0, 0, 10, 10);
Expand Down
5 changes: 3 additions & 2 deletions lib/web_ui/test/canvaskit/surface_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,9 @@ void testMain() {
// A new context is created.
expect(afterContextLost, isNot(same(before)));
},
// Firefox doesn't have the WEBGL_lose_context extension.
skip: isFirefox || isSafari,
// Firefox and Safari don't have the WEBGL_lose_context extension.
// TODO(hterkelsen): https://github.com/flutter/flutter/issues/115327
skip: true,
);

// Regression test for https://github.com/flutter/flutter/issues/75286
Expand Down
6 changes: 4 additions & 2 deletions lib/web_ui/test/text_editing_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2567,7 +2567,8 @@ Future<void> testMain() async {
expect(input.style.outline, 'none');
expect(input.style.border, 'none');
expect(input.style.textShadow, 'none');
});
// TODO(hterkelsen): https://github.com/flutter/flutter/issues/115327
}, skip: isFirefox);

test('prevents effect of (forced-colors: active)', () {
editingStrategy!.enable(
Expand All @@ -2578,7 +2579,8 @@ Future<void> testMain() async {

final DomHTMLElement input = editingStrategy!.activeDomElement;
expect(input.style.getPropertyValue('forced-color-adjust'), 'none');
});
// TODO(hterkelsen): https://github.com/flutter/flutter/issues/115327
}, skip: isFirefox || isSafari);
});
}

Expand Down