Peregrine is a tool for cleaning up and simplifying swift test output on the command line, to make it easier to find test failures, quickly. It includes things like:
The screenshot below shows a side-by-side comparison of the output of swift test
and peregrine run
, against the excellent Units package:
To view all options and subcommands:
peregrine --help
[!NOTE] peregrine is configured to output Nerd Font symbols by default. If you don't have a Nerd Font installed, you can:
- Install one!
- Pass the
--plain
flag toperegrine run
for standard ascii-only output[!WARNING] peregrine does a lot of string parsing, and is heavily reliant on the output format of swift-package-manager. It is meant as a local development convenience tool and should be used as such. I'm sure there are bugs - contributions are welcome! See the "Why?" section below for more details.
It is assumed that you have swift installed, since peregrine is a tool for running swift tests.
- Clone the repository:
git clone https://github.com/GNMoseke/peregrine.git && cd peregrine
- run
./install.sh
- this will build the latest version of peregrine and put it in your/usr/local/bin
- If you wish to uninstall, simply run
./uninstall.sh
PRs are always welcome! There is a lot of work going on in the swift testing space, including the new swift-testing library, which looks to solve many of the same output issues that pushed me to create peregrine in the first place.
--filter
or --skip
flags causes the progress bar to behave unexpectedly - this is due to these flags not being respected by swift test list
. Test success/failure output is unaffected, and will work with these flags.SIGINT
, SIGQUIT
, or SIGSTOP
, the shell cursor may remain hidden. Run tput cnorm
to fixperegrine was born out of my personal need for some simple things in relation to swift testing - namely:
It is a tool meant for local developer convenience, as a prettified way of getting test output. Test infrastructure remains (in my opinion) one of the weakest parts of the swift insfrastructure, though as linked above the new swift-testing library looks to solve many of these problems.