Flexibly run tests

Another pass at #274