Bug 1413374 - [tryselect] Fix |mach try empty| regression and add a test, r=armenzg

MozReview-Commit-ID: Iv2RDqqhL57

--HG--
extra : rebase_source : c609fea4ff27766027fb072bd7c778f3884a1d46
This commit is contained in:
Andrew Halberstadt 2017-11-01 08:12:42 -04:00
Родитель 81f397dba2
Коммит 22eb565843
3 изменённых файлов: 37 добавлений и 1 удалений

Просмотреть файл

@ -8,7 +8,7 @@ from ..cli import BaseTryParser
from ..vcs import VCSHelper
class SyntaxParser(BaseTryParser):
class EmptyParser(BaseTryParser):
name = 'empty'
common_groups = ['push']

Просмотреть файл

@ -1,3 +1,4 @@
[test_empty.t]
[test_fuzzy.t]
[test_message.t]
[test_preset.t]

Просмотреть файл

@ -0,0 +1,35 @@
$ . $TESTDIR/setup.sh
$ cd $topsrcdir
Test empty selector
$ ./mach try empty --no-push
Commit message:
No try selector specified, use "Add New Jobs" to select tasks.
Pushed via `mach try empty`
Calculated try_task_config.json:
{
"tasks":[]
}
$ ./mach try empty --no-push --closed-tree
Commit message:
No try selector specified, use "Add New Jobs" to select tasks. ON A CLOSED TREE
Pushed via `mach try empty`
Calculated try_task_config.json:
{
"tasks":[]
}
$ ./mach try empty --no-push --closed-tree -m "foo {msg} bar"
Commit message:
foo No try selector specified, use "Add New Jobs" to select tasks. bar ON A CLOSED TREE
Pushed via `mach try empty`
Calculated try_task_config.json:
{
"tasks":[]
}