[Web] Detect when running under Dart HHH Web and skip tests under investigation (#93692)

This commit is contained in:
sigmundch 2021-11-18 22:33:04 -08:00 committed by GitHub
parent 7d0981770c
commit f51d3d7e0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View File

@ -220,17 +220,19 @@ Future<void> main(List<String> args) async {
print('$clock ${bold}Test successful.$reset');
}
final String _luciBotId = Platform.environment['SWARMING_BOT_ID'] ?? '';
final bool _runningInDartHHHBot = _luciBotId.startsWith('luci-dart-');
/// Verify the Flutter Engine is the revision in
/// bin/cache/internal/engine.version.
Future<void> _validateEngineHash() async {
final String luciBotId = Platform.environment['SWARMING_BOT_ID'] ?? '';
if (luciBotId.startsWith('luci-dart-')) {
if (_runningInDartHHHBot) {
// The Dart HHH bots intentionally modify the local artifact cache
// and then use this script to run Flutter's test suites.
// Because the artifacts have been changed, this particular test will return
// a false positive and should be skipped.
print('${yellow}Skipping Flutter Engine Version Validation for swarming '
'bot $luciBotId.');
'bot $_luciBotId.');
return;
}
final String expectedVersion = File(engineVersionFile).readAsStringSync().trim();
@ -1506,6 +1508,7 @@ Future<void> _runFlutterWebTest(String webRenderer, String workingDirectory, Lis
'-v',
'--platform=chrome',
'--web-renderer=$webRenderer',
'--dart-define=DART_HHH_BOT=$_runningInDartHHHBot',
'--sound-null-safety',
...flutterTestArgs,
...tests,

View File

@ -883,7 +883,9 @@ void main() {
editable.layout(BoxConstraints.loose(const Size(1000.0, 1000.0)));
expect(editable.maxScrollExtent, equals(10));
});
// TODO(yjbanov): This test is failing in the Dart HHH-web bot and
// needs additional investigation before it can be reenabled.
}, skip: const bool.fromEnvironment('DART_HHH_BOT')); // https://github.com/flutter/flutter/issues/93691
test('getEndpointsForSelection handles empty characters', () {
final TextSelectionDelegate delegate = _FakeEditableTextState();