mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 23:02:41 +01:00
Don't ask for confirmation with unsound unit tests
Test Plan: $ arc diff # with unsound tests $ arc diff --ignore-unsound-tests # with unsound tests Reviewers: epriestley, aran Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T1515 Differential Revision: https://secure.phabricator.com/D2985
This commit is contained in:
parent
014521362f
commit
30bc4ca6e9
1 changed files with 14 additions and 5 deletions
|
@ -342,6 +342,9 @@ EOTEXT
|
||||||
'skip-binaries' => array(
|
'skip-binaries' => array(
|
||||||
'help' => 'Do not upload binaries (like images).',
|
'help' => 'Do not upload binaries (like images).',
|
||||||
),
|
),
|
||||||
|
'ignore-unsound-tests' => array(
|
||||||
|
'help' => 'Ignore unsound test failures without prompting.',
|
||||||
|
),
|
||||||
'base' => array(
|
'base' => array(
|
||||||
'param' => 'rules',
|
'param' => 'rules',
|
||||||
'help' => 'Additional rules for determining base revision.',
|
'help' => 'Additional rules for determining base revision.',
|
||||||
|
@ -1296,12 +1299,18 @@ EOTEXT
|
||||||
"<bg:green>** UNIT OKAY **</bg> No unit test failures.\n");
|
"<bg:green>** UNIT OKAY **</bg> No unit test failures.\n");
|
||||||
break;
|
break;
|
||||||
case ArcanistUnitWorkflow::RESULT_UNSOUND:
|
case ArcanistUnitWorkflow::RESULT_UNSOUND:
|
||||||
|
if ($this->getArgument('ignore-unsound-tests')) {
|
||||||
|
echo phutil_console_format(
|
||||||
|
"<bg:yellow>** UNIT UNSOUND **</bg> Unit testing raised errors, ".
|
||||||
|
"but all failing tests are unsound.\n");
|
||||||
|
} else {
|
||||||
$continue = phutil_console_confirm(
|
$continue = phutil_console_confirm(
|
||||||
"Unit test results included failures, but all failing tests ".
|
"Unit test results included failures, but all failing tests ".
|
||||||
"are known to be unsound. Ignore unsound test failures?");
|
"are known to be unsound. Ignore unsound test failures?");
|
||||||
if (!$continue) {
|
if (!$continue) {
|
||||||
throw new ArcanistUserAbortException();
|
throw new ArcanistUserAbortException();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case ArcanistUnitWorkflow::RESULT_FAIL:
|
case ArcanistUnitWorkflow::RESULT_FAIL:
|
||||||
$this->console->writeOut(
|
$this->console->writeOut(
|
||||||
|
|
Loading…
Reference in a new issue