Repository navigation
Commit e930aa7
authored
[flutter_tools] Support boolean selectors and multiple tag options in test command (flutter#189193) (flutter#190541)
Fixes flutter#189193
In `TestCommand`, `--tags` (`-t`) and `--exclude-tags` (`-x`) were
registered using `addOption(...)` instead of `addMultiOption(...)`. This
scalar option definition retained only the last CLI occurrence when
passed multiple times (`-t a -t b` became `'b'`). Additionally, default
comma splitting in `package:args` mangled composite boolean selector
expressions (`||`, `&&`, `!`) before forwarding arguments to
`package:test`.
This PR migrates `--tags` and `--exclude-tags` to `addMultiOption(...,
splitCommas: false)` in `TestCommand` and updates `FlutterTestRunner` to
forward all `--tags` and `--exclude-tags` values sequentially to `dart
test`.
## Testing
- Added hermetic regression test `passes boolean selectors and multiple
tags/exclude-tags through to package:test` in
`packages/flutter_tools/test/commands.shard/hermetic/test_test.dart`.1 parent 1470e0a commit e930aa7
3 files changed
Lines changed: 54 additions & 16 deletions
File tree
- packages/flutter_tools
- lib/src
- commands
- test
- test/commands.shard/hermetic
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
109 | 110 | | |
110 | | - | |
| 111 | + | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| 116 | + | |
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
| |||
428 | 430 | | |
429 | 431 | | |
430 | 432 | | |
431 | | - | |
432 | | - | |
| 433 | + | |
| 434 | + | |
433 | 435 | | |
434 | 436 | | |
435 | 437 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
| 85 | + | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
592 | | - | |
593 | | - | |
| 592 | + | |
| 593 | + | |
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
| |||
656 | 656 | | |
657 | 657 | | |
658 | 658 | | |
659 | | - | |
660 | | - | |
| 659 | + | |
| 660 | + | |
661 | 661 | | |
662 | 662 | | |
663 | 663 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
219 | 255 | | |
220 | 256 | | |
221 | 257 | | |
| |||
1692 | 1728 | | |
1693 | 1729 | | |
1694 | 1730 | | |
1695 | | - | |
1696 | | - | |
| 1731 | + | |
| 1732 | + | |
1697 | 1733 | | |
1698 | 1734 | | |
1699 | 1735 | | |
| |||
1750 | 1786 | | |
1751 | 1787 | | |
1752 | 1788 | | |
1753 | | - | |
1754 | | - | |
| 1789 | + | |
| 1790 | + | |
1755 | 1791 | | |
1756 | 1792 | | |
1757 | 1793 | | |
| |||
0 commit comments