Add test exemption for embedder tests and fixtures (#2340)
Embedder API tests in the engine are implemented as C++ unit tests and
test infrastructure such as embedder_test_context_metal.{h,cc} (located
under the shell/platform/embedder/tests directory), which execute and
test Dart functions (and associated test assets) stored in the
shell/platform/embedder/fixtures directory.
Uncovered while sending https://github.com/flutter/engine/pull/38133.
Issue: https://github.com/flutter/flutter/issues/116381
diff --git a/app_dart/lib/src/request_handlers/github/webhook_subscription.dart b/app_dart/lib/src/request_handlers/github/webhook_subscription.dart
index b17b323..a00ab30 100644
--- a/app_dart/lib/src/request_handlers/github/webhook_subscription.dart
+++ b/app_dart/lib/src/request_handlers/github/webhook_subscription.dart
@@ -313,7 +313,9 @@
filename.contains('.github/') ||
filename.endsWith('.md') ||
// Exempt paths.
- filename.startsWith('dev/devicelab/lib/versions/gallery.dart');
+ filename.startsWith('dev/devicelab/lib/versions/gallery.dart') ||
+ filename.startsWith('shell/platform/embedder/tests') ||
+ filename.startsWith('shell/platform/embedder/fixtures');
}
/// Returns the set of labels applicable to a file in the framework repo.
diff --git a/app_dart/test/request_handlers/github/webhook_subscription_test.dart b/app_dart/test/request_handlers/github/webhook_subscription_test.dart
index 3ce473b..8439bab 100644
--- a/app_dart/test/request_handlers/github/webhook_subscription_test.dart
+++ b/app_dart/test/request_handlers/github/webhook_subscription_test.dart
@@ -889,9 +889,11 @@
final RepositorySlug slug = RepositorySlug('flutter', 'flutter');
when(pullRequestsService.listFiles(slug, issueNumber)).thenAnswer(
- (_) => Stream<PullRequestFile>.value(
+ (_) => Stream<PullRequestFile>.fromIterable(<PullRequestFile>[
PullRequestFile()..filename = 'dev/devicelab/lib/versions/gallery.dart',
- ),
+ PullRequestFile()..filename = 'shell/platform/embedder/tests/embedder_test_context.cc',
+ PullRequestFile()..filename = 'shell/platform/embedder/fixtures/main.dart',
+ ]),
);
when(issuesService.listCommentsByIssue(slug, issueNumber)).thenAnswer(