James E Keenan
and 1 contributors


reduce-tests - Create a branch with fewer test files for faster development


  reduce-tests \
    --dir=/path/to/git/workdir \
    --include=t/90-load.t,t/91-unload.t \
    --branch=master \
    --prefix=smoke-me \
    --remote=origin \


reduce-tests is a command-line utility which will be useful in the following situation:

  • You have a Perl library stored in a git repository.

  • You have a large test suite for that library which takes a non-trivial length of time to run.

  • You wish to run only a subset of those tests.

reduce-tests enables you to copy a branch, remove files from that branch's test suite and run that reduced test suite. The test suite may be reduced either by:

  • Specifying only those test files you wish to include (include=t/firstfile,t/secondfile); or

  • Specifying all the test files you wish to exclude (exclude=t/thirdfile,t/fourthfile).

This program is likely to be particularly useful in the situation where:

  • You are required to push all branches to a smoke server for testing.

  • That smoke-testing is activated by prefixing your remote branch with a string which your smoke-server recognizes as a request for a smoke run.

  • The smoke server is taking an inordinately long time to complete its test runs and/or is reporting failures in test files which you cannot reproduce in your development environment (heisenfails). If you have no immediate control over that smoke server, you can at least speed up your development cycle by running only the part of the test suite you need to focus on at a given moment.


reduce-tests is implemented by CPAN distribution Git-Reduce-Tests. See the documentation in Git::Reduce::Tests (available after installation, via perldoc Git::Reduce::Tests for information about reporting bugs, support, author, copyright notice and license.