diff options
author | matthew <matthew> | 2009-07-16 14:56:02 +0000 |
---|---|---|
committer | matthew <matthew> | 2009-07-16 14:56:02 +0000 |
commit | fc3a505aad9b4ec1be5121bb6ec825bb20431d9c (patch) | |
tree | 8cf5fba6cdc658dacd2bb2dd349fdb5899188ff6 /bin/test-run | |
parent | f20984e39e4229855808faafdce681b543d790b2 (diff) |
So order can be fixed.
Diffstat (limited to 'bin/test-run')
-rwxr-xr-x | bin/test-run | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/bin/test-run b/bin/test-run index 9be2d831a..5ec25431e 100755 --- a/bin/test-run +++ b/bin/test-run @@ -19,7 +19,7 @@ # RSS # Whatever I've missed! -my $rcsid = ''; $rcsid .= '$Id: test-run,v 1.5 2009-07-16 14:16:13 matthew Exp $'; +my $rcsid = ''; $rcsid .= '$Id: test-run,v 1.6 2009-07-16 14:56:02 matthew Exp $'; use strict; require 5.8.0; @@ -30,7 +30,8 @@ mySociety::Config::set_file('../conf/general'); use mySociety::DBHandle qw(dbh); use mySociety::WebTestHarness; -my %actions = ( +my @actions = ('report', 'update', 'questionnaire', 'alert', 'static'); +my %actions_desc = ( 'report' => 'report a problem', 'update' => 'leave an update on a report', 'questionnaire' => 'receive and answer a questionnaire or two', @@ -40,7 +41,8 @@ my %actions = ( date_print("Set up web test harness..."); my ($wth, $action, $verbose, $pause, $multispawn) = mySociety::WebTestHarness::setup({ - actions => \%actions, + actions => \@actions, + actions_desc => \%actions_desc, dbname => 'BCI', 'sql_extra' => '../db/alert_types.sql', }); @@ -64,8 +66,9 @@ sleep(1); # XXX Without this, the above/below suck in one error line but not the my $errors = $wth->_log_watcher_get_errors(); # As Perl has two error lines. # Run the reports -foreach (keys %$action) { - date_print($actions{$_}) if $actions{$_}; +foreach (@actions) { + next unless $action->{$_}; + date_print($actions_desc{$_}) if $actions_desc{$_}; do_report() if $_ eq 'report'; do_update() if $_ eq 'update'; do_questionnaire() if $_ eq 'questionnaire'; |