Files
pipelines/app/tool/memwatch/fixtures/passing_fixture_test.dart
T
alan 941d2a7148 memwatch: quiet bounded test summary off a terminal; bounded analyze wrapper
run.sh now records flutter's JSON results beside the log and prints a
summary from tool/memwatch/summary.dart: one verdict line (pass/fail/skip
counts, peak MB, duration, exit status), only failing tests with their
error and app stack frames (framework frames dropped, per-test and total
caps, tail of printed output), the tests still running when killed, and
the log and JSON paths. Quiet is the default when stdout is not a
terminal; MEMWATCH_OUTPUT=full also prints the whole log. The watchdog
loop and exit status are unchanged.

tool/analyze.sh bounds flutter analyze to a verdict line and the first
40 issues. Tests: test/tool/memwatch/summary_test.dart and the
end-to-end tool/memwatch/quiet_test.sh over fixture suites.
2026-11-04 13:10:21 +00:00

16 lines
546 B
Dart

// Fixture for tool/memwatch/quiet_test.sh: a passing suite whose output must
// not appear in quiet mode. It lives outside test/ so the app suite skips it.
import 'package:flutter_test/flutter_test.dart';
void main() {
for (var i = 0; i < 3; i++) {
test('passing fixture $i', () {
// Printed output of a passing test is not part of the quiet summary.
// ignore: avoid_print
print('memwatch-noise-from-passing-test $i');
expect(i, lessThan(3));
});
}
test('skipped fixture', () {}, skip: 'fixture skip');
}