Page MenuHomePhabricator

arc unit throws when there are no tests to run on PHP7
Closed, DuplicatePublic

Description

Requirements: PHP7 in CLI mode

Run arc unit on a directory that has no tests

Result:

[2015-10-26 16:39:04] ERROR 2: Invalid argument supplied for foreach() at [/derpa/arcanist/src/unit/engine/PhutilUnitTestEngine.php:161]
arcanist(head=master, ref.master=dfde57ff812b), phutil(head=master, ref.master=db3667a62f66)
  #0 PhutilUnitTestEngine::getTestPaths() called at [<arcanist>/src/unit/engine/PhutilUnitTestEngine.php:129]
  #1 PhutilUnitTestEngine::getTestsForPaths() called at [<arcanist>/src/unit/engine/PhutilUnitTestEngine.php:20]
  #2 PhutilUnitTestEngine::run() called at [<arcanist>/src/unit/engine/ArcanistConfigurationDrivenUnitTestEngine.php:143]
  #3 ArcanistConfigurationDrivenUnitTestEngine::run() called at [<arcanist>/src/workflow/ArcanistUnitWorkflow.php:175]
  #4 ArcanistUnitWorkflow::run() called at [<arcanist>/scripts/arcanist.php:382]
No tests to run.

We probably shouldn't do that

Revisions and Commits