1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-09-20 08:58:55 +02: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(
'help' => 'Do not upload binaries (like images).',
),
'ignore-unsound-tests' => array(
'help' => 'Ignore unsound test failures without prompting.',
),
'base' => array(
'param' => 'rules',
'help' => 'Additional rules for determining base revision.',
@ -1296,11 +1299,17 @@ EOTEXT
"<bg:green>** UNIT OKAY **</bg> No unit test failures.\n");
break;
case ArcanistUnitWorkflow::RESULT_UNSOUND:
$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();
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(
"Unit test results included failures, but all failing tests ".
"are known to be unsound. Ignore unsound test failures?");
if (!$continue) {
throw new ArcanistUserAbortException();
}
}
break;
case ArcanistUnitWorkflow::RESULT_FAIL: