get_test_runner_for_path

Function get_test_runner_for_path 

Source
fn get_test_runner_for_path(path: &Path) -> Result<&'static str>
Expand description

Get the application to use to run the tests based on the presence of a Makefile.toml in the root of a git repository where the supplied Path resides.

If the file is found “cargo make test” is used to run the tests. “cargo test” is used otherwise.

Assumptions:

  1. We’re always working in a git repository
  2. no custom config file for cargo-make

§Errors

  • A filesystem operation (open/read/write/remove) fails.
  • The path is not inside a Git repository.