mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 00:05:36 +00:00
Bug 1497575: [staging-release] Fix tryselect tests for changed json formatting; r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D9153 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
85889543ba
commit
e13a780a70
@ -52,7 +52,7 @@ old_history_path = os.path.join(get_state_dir()[0], 'history', 'try_task_configs
|
||||
def write_task_config(try_task_config):
|
||||
config_path = os.path.join(vcs.path, 'try_task_config.json')
|
||||
with open(config_path, 'w') as fh:
|
||||
json.dump(try_task_config, fh, indent=4, separators=(',', ': '))
|
||||
json.dump(try_task_config, fh, indent=4, separators=(',', ': '), sort_keys=True)
|
||||
fh.write('\n')
|
||||
return config_path
|
||||
|
||||
|
@ -10,7 +10,8 @@ Test empty selector
|
||||
Pushed via `mach try empty`
|
||||
Calculated try_task_config.json:
|
||||
{
|
||||
"tasks":[]
|
||||
"tasks": [],
|
||||
"version": 1
|
||||
}
|
||||
|
||||
$ ./mach try empty --no-push --closed-tree
|
||||
@ -20,7 +21,8 @@ Test empty selector
|
||||
Pushed via `mach try empty`
|
||||
Calculated try_task_config.json:
|
||||
{
|
||||
"tasks":[]
|
||||
"tasks": [],
|
||||
"version": 1
|
||||
}
|
||||
|
||||
$ ./mach try empty --no-push --closed-tree -m "foo {msg} bar"
|
||||
@ -30,6 +32,7 @@ Test empty selector
|
||||
Pushed via `mach try empty`
|
||||
Calculated try_task_config.json:
|
||||
{
|
||||
"tasks":[]
|
||||
"tasks": [],
|
||||
"version": 1
|
||||
}
|
||||
|
||||
|
@ -10,10 +10,11 @@ Test fuzzy selector
|
||||
Pushed via `mach try fuzzy`
|
||||
Calculated try_task_config.json:
|
||||
{
|
||||
"tasks":[
|
||||
"test/foo-debug",
|
||||
"test/foo-opt"
|
||||
]
|
||||
"tasks": [
|
||||
"test/foo-debug",
|
||||
"test/foo-opt"
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
|
||||
$ ./mach try fuzzy $testargs -q "'bar"
|
||||
@ -25,10 +26,11 @@ Test fuzzy selector
|
||||
Pushed via `mach try fuzzy`
|
||||
Calculated try_task_config.json:
|
||||
{
|
||||
"tasks":[
|
||||
"test/bar-debug",
|
||||
"test/bar-opt"
|
||||
]
|
||||
"tasks": [
|
||||
"test/bar-debug",
|
||||
"test/bar-opt"
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
|
||||
|
||||
@ -41,12 +43,13 @@ Test multiple selectors
|
||||
Pushed via `mach try fuzzy`
|
||||
Calculated try_task_config.json:
|
||||
{
|
||||
"tasks":[
|
||||
"test/bar-debug",
|
||||
"test/bar-opt",
|
||||
"test/foo-debug",
|
||||
"test/foo-opt"
|
||||
]
|
||||
"tasks": [
|
||||
"test/bar-debug",
|
||||
"test/bar-opt",
|
||||
"test/foo-debug",
|
||||
"test/foo-opt"
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
|
||||
|
||||
@ -59,15 +62,16 @@ Test templates
|
||||
Pushed via `mach try fuzzy`
|
||||
Calculated try_task_config.json:
|
||||
{
|
||||
"templates":{
|
||||
"artifact":{
|
||||
"enabled":"1"
|
||||
}
|
||||
},
|
||||
"tasks":[
|
||||
"test/foo-debug",
|
||||
"test/foo-opt"
|
||||
]
|
||||
"tasks": [
|
||||
"test/foo-debug",
|
||||
"test/foo-opt"
|
||||
],
|
||||
"templates": {
|
||||
"artifact": {
|
||||
"enabled": "1"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
|
||||
$ ./mach try fuzzy $testargs --env FOO=1 --env BAR=baz -q "'foo"
|
||||
@ -77,15 +81,16 @@ Test templates
|
||||
Pushed via `mach try fuzzy`
|
||||
Calculated try_task_config.json:
|
||||
{
|
||||
"templates":{
|
||||
"env":{
|
||||
"FOO":"1",
|
||||
"BAR":"baz"
|
||||
}
|
||||
},
|
||||
"tasks":[
|
||||
"test/foo-debug",
|
||||
"test/foo-opt"
|
||||
]
|
||||
"tasks": [
|
||||
"test/foo-debug",
|
||||
"test/foo-opt"
|
||||
],
|
||||
"templates": {
|
||||
"env": {
|
||||
"BAR": "baz",
|
||||
"FOO": "1"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
|
||||
|
@ -12,10 +12,11 @@ Test custom commit messages with fuzzy selector
|
||||
Pushed via `mach try fuzzy`
|
||||
Calculated try_task_config.json:
|
||||
{
|
||||
"tasks":[
|
||||
"test/foo-debug",
|
||||
"test/foo-opt"
|
||||
]
|
||||
"tasks": [
|
||||
"test/foo-debug",
|
||||
"test/foo-opt"
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
|
||||
$ ./mach try fuzzy $testargs -q foo -m "Foobar: {msg}"
|
||||
@ -25,10 +26,11 @@ Test custom commit messages with fuzzy selector
|
||||
Pushed via `mach try fuzzy`
|
||||
Calculated try_task_config.json:
|
||||
{
|
||||
"tasks":[
|
||||
"test/foo-debug",
|
||||
"test/foo-opt"
|
||||
]
|
||||
"tasks": [
|
||||
"test/foo-debug",
|
||||
"test/foo-opt"
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
|
||||
$ unset EDITOR
|
||||
|
@ -73,9 +73,10 @@ Test preset with fuzzy subcommand
|
||||
Pushed via `mach try fuzzy`
|
||||
Calculated try_task_config.json:
|
||||
{
|
||||
"tasks":[
|
||||
"build-baz"
|
||||
]
|
||||
"tasks": [
|
||||
"build-baz"
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
|
||||
$ ./mach try fuzzy $testargs --preset baz
|
||||
@ -85,9 +86,10 @@ Test preset with fuzzy subcommand
|
||||
Pushed via `mach try fuzzy`
|
||||
Calculated try_task_config.json:
|
||||
{
|
||||
"tasks":[
|
||||
"build-baz"
|
||||
]
|
||||
"tasks": [
|
||||
"build-baz"
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
|
||||
|
||||
@ -98,11 +100,12 @@ Test preset with fuzzy subcommand
|
||||
Pushed via `mach try fuzzy`
|
||||
Calculated try_task_config.json:
|
||||
{
|
||||
"tasks":[
|
||||
"build-baz",
|
||||
"test/foo-debug",
|
||||
"test/foo-opt"
|
||||
]
|
||||
"tasks": [
|
||||
"build-baz",
|
||||
"test/foo-debug",
|
||||
"test/foo-opt"
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
|
||||
$ ./mach try $testargs --preset baz
|
||||
@ -112,9 +115,10 @@ Test preset with fuzzy subcommand
|
||||
Pushed via `mach try fuzzy`
|
||||
Calculated try_task_config.json:
|
||||
{
|
||||
"tasks":[
|
||||
"build-baz"
|
||||
]
|
||||
"tasks": [
|
||||
"build-baz"
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
|
||||
$ ./mach try fuzzy $testargs --list-presets
|
||||
|
Loading…
Reference in New Issue
Block a user