This script below lets you test changes while continuing to work on code. Let’s say that your test suite takes quite a while to run (hello, libguestfs). You can do:
$ test-change make check
The script copies the whole current directory into a temporary directory and runs the check in there. You still have to open a new terminal to run the tests, but the tests can go ahead while you continue working.
#!/bin/bash - # Copy current directory to a temporary, # then run the test command on that copy, # and report the results. # by Richard W.M. Jones <rjones@redhat.com> # # Usage (from current directory): # test-change command [args ...] # eg: # test-change make check echo "Copying original directory; wait a moment ..." d=`mktemp -d` trap "rm -rf $d" EXIT INT TERM QUIT cp -a . $d cd $d echo "Original directory copied, starting test." echo "You can carry on working now." sleep 1 # Run the test command. "$@"

Some bugs:
/bin/bash is bogus; use /usr/bin/env bash in the worst case or /bin/sh in the best case. I can see nothing that is not POSIX here so use /bin/sh
cp -a . $d should be “$d” out of habbit, although not required by any actual existing mktemp implementations; same with cd $d.
sleep 1 is pointless here.
Perhaps this script can detect the use of ZFS and automatically call “zfs snapshot/clone” in order to avoid the slowness of cp?