forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add '--message' and '--bug' command line args.
These will automatically insert comments above the disabled test indicating why it's disabled. --bug is a shorthand form which generates a message with a TODO referencing the given bug. Bug: 1281261 Change-Id: I97c3238aa748227f34155e6378c38bc2059c225e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3426750 Reviewed-by: Patrick Meiring <meiring@google.com> Commit-Queue: Owen Rodley <orodley@chromium.org> Auto-Submit: Owen Rodley <orodley@chromium.org> Cr-Commit-Position: refs/heads/main@{#967095}
- Loading branch information
Owen Rodley
authored and
Chromium LUCI CQ
committed
Feb 4, 2022
1 parent
c222868
commit 83d8dbc
Showing
9 changed files
with
276 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Copyright 2022 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
"""Tests for disable.py""" | ||
|
||
import unittest | ||
import disable | ||
|
||
|
||
class DisableTest(unittest.TestCase): | ||
def test_parse_bug(self): | ||
self.assertEqual(disable.parse_bug('1234'), (1234, 'chromium')) | ||
self.assertEqual(disable.parse_bug('crbug/9871'), (9871, 'chromium')) | ||
self.assertEqual(disable.parse_bug('https://crbug/9871'), | ||
(9871, 'chromium')) | ||
self.assertEqual(disable.parse_bug('crbug/v8/111111'), (111111, 'v8')) | ||
self.assertEqual(disable.parse_bug('https://crbug/v8/111111'), | ||
(111111, 'v8')) | ||
self.assertEqual(disable.parse_bug('crbug.com/8'), (8, 'chromium')) | ||
self.assertEqual(disable.parse_bug('https://crbug.com/8'), (8, 'chromium')) | ||
self.assertEqual(disable.parse_bug('crbug.com/monorail/19782757'), | ||
(19782757, 'monorail')) | ||
self.assertEqual(disable.parse_bug('https://crbug.com/monorail/19782757'), | ||
(19782757, 'monorail')) | ||
self.assertEqual( | ||
disable.parse_bug('bugs.chromium.org/p/foo/issues/detail?id=6060842'), | ||
(6060842, 'foo')) | ||
self.assertEqual( | ||
disable.parse_bug( | ||
'http://bugs.chromium.org/p/foo/issues/detail?id=6060842'), | ||
(6060842, 'foo')) | ||
self.assertEqual( | ||
disable.parse_bug( | ||
'https://bugs.chromium.org/p/foo/issues/detail?id=6060842'), | ||
(6060842, 'foo')) | ||
self.assertEqual( | ||
disable.parse_bug('https://bugs.chromium.org/p/foo/issues/detail' + | ||
'?id=191972&q=owner%3Ame%20link&can=2'), | ||
(191972, 'foo')) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.