From 30bc4ca6e926e73c4ca0352446a66d6baff4f197 Mon Sep 17 00:00:00 2001 From: vrana Date: Mon, 16 Jul 2012 15:54:11 -0700 Subject: [PATCH] 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 --- src/workflow/ArcanistDiffWorkflow.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/workflow/ArcanistDiffWorkflow.php b/src/workflow/ArcanistDiffWorkflow.php index c4ab3abf..278bfbdd 100644 --- a/src/workflow/ArcanistDiffWorkflow.php +++ b/src/workflow/ArcanistDiffWorkflow.php @@ -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 "** UNIT OKAY ** 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( + "** UNIT UNSOUND ** 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: -- 2.43.0