mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 14:52:40 +01:00
Fail lint tests if no tests are found in the test directory
Summary: Ref T4570. Testing a directory with no recognized tests currently passes, but should fail. Test Plan: - Ran `arc unit`. - Removed tests from a test directory, ran `arc unit`, got test failure. Reviewers: leebyron, btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T4570 Differential Revision: https://secure.phabricator.com/D8434
This commit is contained in:
parent
18251a1bd8
commit
22f6207920
1 changed files with 7 additions and 0 deletions
|
@ -13,9 +13,16 @@ abstract class ArcanistLinterTestCase extends ArcanistPhutilTestCase {
|
|||
->withSuffix('lint-test')
|
||||
->find();
|
||||
|
||||
$test_count = 0;
|
||||
foreach ($files as $file) {
|
||||
$this->lintFile($root.$file, $linter);
|
||||
$test_count++;
|
||||
}
|
||||
|
||||
$this->assertEqual(
|
||||
true,
|
||||
($test_count > 0),
|
||||
pht('Expected to find some .lint-test tests in directory %s!', $root));
|
||||
}
|
||||
|
||||
private function lintFile($file, $linter) {
|
||||
|
|
Loading…
Reference in a new issue