Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistDiffWorkflow.php
| Show First 20 Lines • Show All 289 Lines • ▼ Show 20 Lines | $arguments = array( | ||||
| ), | ), | ||||
| ), | ), | ||||
| 'skip-binaries' => array( | 'skip-binaries' => array( | ||||
| 'help' => pht('Do not upload binaries (like images).'), | 'help' => pht('Do not upload binaries (like images).'), | ||||
| ), | ), | ||||
| 'skip-staging' => array( | 'skip-staging' => array( | ||||
| 'help' => pht('Do not copy changes to the staging area.'), | 'help' => pht('Do not copy changes to the staging area.'), | ||||
| ), | ), | ||||
| 'ignore-unsound-tests' => array( | |||||
| 'help' => pht('Ignore unsound test failures without prompting.'), | |||||
| ), | |||||
| 'base' => array( | 'base' => array( | ||||
| 'param' => 'rules', | 'param' => 'rules', | ||||
| 'help' => pht('Additional rules for determining base revision.'), | 'help' => pht('Additional rules for determining base revision.'), | ||||
| 'nosupport' => array( | 'nosupport' => array( | ||||
| 'svn' => pht('Subversion does not use base commits.'), | 'svn' => pht('Subversion does not use base commits.'), | ||||
| ), | ), | ||||
| 'supports' => array('git', 'hg'), | 'supports' => array('git', 'hg'), | ||||
| ), | ), | ||||
| ▲ Show 20 Lines • Show All 924 Lines • ▼ Show 20 Lines | try { | ||||
| switch ($unit_result) { | switch ($unit_result) { | ||||
| case ArcanistUnitWorkflow::RESULT_OKAY: | case ArcanistUnitWorkflow::RESULT_OKAY: | ||||
| $this->console->writeOut( | $this->console->writeOut( | ||||
| "<bg:green>** %s **</bg> %s\n", | "<bg:green>** %s **</bg> %s\n", | ||||
| pht('UNIT OKAY'), | pht('UNIT OKAY'), | ||||
| pht('No unit test failures.')); | pht('No unit test failures.')); | ||||
| break; | break; | ||||
| case ArcanistUnitWorkflow::RESULT_UNSOUND: | case ArcanistUnitWorkflow::RESULT_UNSOUND: | ||||
| if ($this->getArgument('ignore-unsound-tests')) { | |||||
| echo phutil_console_format( | |||||
| "<bg:yellow>** %s **</bg> %s\n", | |||||
| pht('UNIT UNSOUND'), | |||||
| pht( | |||||
| 'Unit testing raised errors, but all '. | |||||
| 'failing tests are unsound.')); | |||||
| } else { | |||||
| $continue = phutil_console_confirm( | $continue = phutil_console_confirm( | ||||
| pht( | pht( | ||||
| '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(); | ||||
| } | } | ||||
| } | |||||
| echo phutil_console_format( | |||||
| "<bg:yellow>** %s **</bg> %s\n", | |||||
| pht('UNIT UNSOUND'), | |||||
| pht( | |||||
| 'Unit testing raised errors, but all '. | |||||
| 'failing tests are unsound.')); | |||||
| break; | break; | ||||
| case ArcanistUnitWorkflow::RESULT_FAIL: | case ArcanistUnitWorkflow::RESULT_FAIL: | ||||
| $this->console->writeOut( | $this->console->writeOut( | ||||
| "<bg:red>** %s **</bg> %s\n", | "<bg:red>** %s **</bg> %s\n", | ||||
| pht('UNIT ERRORS'), | pht('UNIT ERRORS'), | ||||
| pht('Unit testing raised errors!')); | pht('Unit testing raised errors!')); | ||||
| break; | break; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,620 Lines • Show Last 20 Lines | |||||