RT notifier: parse templates without header correctly
[openxpki.git] / tools / automated_test_reports / update_svn_and_test.pl
blob8423ad3b4988c4ce2d5757f42ee4baa4522166aa
1 #!/usr/bin/env perl
3 use strict;
4 use warnings;
6 my $output_dir = $ARGV[0];
7 if (! defined $output_dir) {
8 die "Usage: $0 <report_dir>";
10 if (! -e 'perl-modules/core/trunk/t') {
11 # only run from the correct directory
12 die "Please start from main OpenXPKI trunk directory\n";
15 open my $SVN, 'svn log -qr HEAD ..|';
16 <$SVN>;
17 my $svn_info = <$SVN>;
18 my ($newest_revision) = ($svn_info =~ m{ \A r(\d+) .* }xms);
20 my $local_revision = `../tools/vergen --format SVN_LAST_CHANGED_REVISION`;
22 for (my $rev = $local_revision + 1; $rev <= $newest_revision; $rev++) {
23 print STDERR "Updating to revision $rev ...\n";
24 `svn update -r $rev ..`;
25 print STDERR "Running tests for revision $rev ...\n";
26 `generate_report.pl $output_dir`;