Skip to content

Commit 5674b0c

Browse files
committed
Add shell scripts to engine test pattern
1 parent 3474fea commit 5674b0c

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

app_dart/lib/src/request_handlers/github/webhook_subscription.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const Set<String> kNeedsCheckLabelsAndTests = <String>{
3232
'flutter/plugins',
3333
};
3434

35-
final RegExp kEngineTestRegExp = RegExp(r'(tests?|benchmarks?)\.(dart|java|mm|m|cc)$');
35+
final RegExp kEngineTestRegExp = RegExp(r'(tests?|benchmarks?)\.(dart|java|mm|m|cc|sh)$');
3636
final List<String> kNeedsTestsLabels = <String>['needs tests'];
3737

3838
/// Subscription for processing GitHub webhooks.

app_dart/test/request_handlers/github/webhook_subscription_test.dart

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1759,6 +1759,33 @@ void foo() {
17591759
);
17601760
});
17611761

1762+
test('Engine labels PRs, no comment if script tests', () async {
1763+
const int issueNumber = 123;
1764+
1765+
tester.message = generateGithubWebhookMessage(
1766+
action: 'opened',
1767+
number: issueNumber,
1768+
slug: Config.engineSlug,
1769+
);
1770+
1771+
when(pullRequestsService.listFiles(Config.engineSlug, issueNumber)).thenAnswer(
1772+
(_) => Stream<PullRequestFile>.fromIterable(<PullRequestFile>[
1773+
PullRequestFile()..filename = 'fml/blah.cc',
1774+
PullRequestFile()..filename = 'fml/testing/blah_test.sh',
1775+
]),
1776+
);
1777+
1778+
await tester.post(webhook);
1779+
1780+
verifyNever(
1781+
issuesService.createComment(
1782+
Config.engineSlug,
1783+
issueNumber,
1784+
argThat(contains(config.missingTestsPullRequestMessageValue)),
1785+
),
1786+
);
1787+
});
1788+
17621789
test('Engine labels PRs, no comment if cc tests', () async {
17631790
const int issueNumber = 123;
17641791

@@ -1794,7 +1821,7 @@ void foo() {
17941821
);
17951822
});
17961823

1797-
test('Engine labels PRs, no comment if cc becnhmarks', () async {
1824+
test('Engine labels PRs, no comment if cc benchmarks', () async {
17981825
const int issueNumber = 123;
17991826

18001827
tester.message = generateGithubWebhookMessage(

0 commit comments

Comments
 (0)