|
Revision 1148, 1.1 kB
(checked in by earle, 8 months ago)
|
|
Store test results in a directory, files named by day.
|
-
Property svn:executable set to
*
|
| Line | |
|---|
| 1 | |
|---|
| 2 | |
|---|
| 3 | use warnings; |
|---|
| 4 | use strict; |
|---|
| 5 | |
|---|
| 6 | use Config::Tiny; |
|---|
| 7 | use Cwd; |
|---|
| 8 | use SVN::Agent; |
|---|
| 9 | |
|---|
| 10 | my $config_file = Config::Tiny->new->read('status.conf'); |
|---|
| 11 | |
|---|
| 12 | my %config; |
|---|
| 13 | |
|---|
| 14 | foreach (qw(domain trunk lib script arch libdoc bindoc)) { |
|---|
| 15 | $config{$_} = $config_file->{_}->{$_} || die "No '$_' specified in status.conf"; |
|---|
| 16 | } |
|---|
| 17 | |
|---|
| 18 | die "trunk dir doesn't exist" unless -e $config{'trunk'}; |
|---|
| 19 | die "trunk dir isn't a directory" unless -d _; |
|---|
| 20 | die "trunk dir isn't readable" unless -r _; |
|---|
| 21 | die "trunk dir isn't writable" unless -w _; |
|---|
| 22 | |
|---|
| 23 | my $sa = SVN::Agent->load({ path => $config{'trunk'} }); |
|---|
| 24 | $sa->update; |
|---|
| 25 | |
|---|
| 26 | my $program_dir = cwd; |
|---|
| 27 | |
|---|
| 28 | chdir $config{'trunk'}; |
|---|
| 29 | system("perl Build.PL --force \ |
|---|
| 30 | install_path=lib=$config{'lib'} \ |
|---|
| 31 | install_path=script=$config{'script'} \ |
|---|
| 32 | install_path=arch=$config{'arch'} \ |
|---|
| 33 | install_path=libdoc=$config{'libdoc'} \ |
|---|
| 34 | install_path=bindoc=$config{'bindoc'}"); |
|---|
| 35 | |
|---|
| 36 | my (undef, undef, undef, $day, $month, $year) = localtime(time); |
|---|
| 37 | $year += 1900; |
|---|
| 38 | $month = sprintf("%02d", ++$month); |
|---|
| 39 | |
|---|
| 40 | system("perl Build"); |
|---|
| 41 | system("perl Build test verbose=1 2>&1 > $program_dir/reports/test-results-$year-$month-$day.txt"); |
|---|