1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 14:52:40 +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:
vrana 2012-07-16 15:54:11 -07:00
parent 014521362f
commit 30bc4ca6e9

View file

@ -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,11 +1299,17 @@ 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:
$continue = phutil_console_confirm( if ($this->getArgument('ignore-unsound-tests')) {
"Unit test results included failures, but all failing tests ". echo phutil_console_format(
"are known to be unsound. Ignore unsound test failures?"); "<bg:yellow>** UNIT UNSOUND **</bg> Unit testing raised errors, ".
if (!$continue) { "but all failing tests are unsound.\n");
throw new ArcanistUserAbortException(); } else {
$continue = phutil_console_confirm(
"Unit test results included failures, but all failing tests ".
"are known to be unsound. Ignore unsound test failures?");
if (!$continue) {
throw new ArcanistUserAbortException();
}
} }
break; break;
case ArcanistUnitWorkflow::RESULT_FAIL: case ArcanistUnitWorkflow::RESULT_FAIL: