diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2015-01-15 14:02:19 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2015-01-19 16:35:36 +0000 |
commit | b203e7907fa4808966521da8e18d9796e28e9b9a (patch) | |
tree | 268a49410fd4bfc42e752a8b52c48d537b5b865d /bin/run-tests | |
parent | 2e8df1a5a6610c43e0c1bda15d018fa16738061b (diff) |
Rename test-wrapper to run-tests.
As that's what it does; and use it in Travis.
Diffstat (limited to 'bin/run-tests')
-rwxr-xr-x | bin/run-tests | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/bin/run-tests b/bin/run-tests new file mode 100755 index 000000000..42315e2f2 --- /dev/null +++ b/bin/run-tests @@ -0,0 +1,35 @@ +#!/usr/bin/env perl +use strict; use warnings; + +BEGIN { + use FindBin; + require "$FindBin::Bin/../setenv.pl"; +} + +use FixMyStreet::TestAppProve; + +=head1 NAME + +bin/run-tests - spin up a clean database and configuration for tests + +=head1 USAGE + + bin/run-tests t/ # runs prove -r t/ (recursively, saving state) + bin/run-tests --state=failed # runs just failing tests + # delete .prove to reset + + bin/run-tests t/foo.t # runs with prove -v (single test) + +By default we use conf/general.yml-example as the template, and spin up a fresh +Postgres cluster and database. We can override this by doing: + + bin/run-tests --config=general.mycobrand.yml + bin/run-tests --db-config=general.yml # e.g. use your current DB settings + bin/run-tests --all-config=general.yml # e.g. use your current DB settings + +(NB: passing --state=save automagically is experimental, and will be removed if +it turns out to be annoying.) + +=cut + +FixMyStreet::TestAppProve->run(@ARGV); |