source: status/runbuild.pl @ 1148

Last change on this file since 1148 was 1148, checked in by Earle Martin, 14 years ago

Store test results in a directory, files named by day.

  • Property svn:executable set to *
File size: 1.1 KB
Line 
1#!/usr/bin/perl
2
3use warnings;
4use strict;
5
6use Config::Tiny;
7use Cwd;
8use SVN::Agent;
9
10my $config_file = Config::Tiny->new->read('status.conf');
11
12my %config;
13
14foreach (qw(domain trunk lib script arch libdoc bindoc)) {
15        $config{$_} = $config_file->{_}->{$_} || die "No '$_' specified in status.conf";
16}
17
18die "trunk dir doesn't exist"     unless -e $config{'trunk'};
19die "trunk dir isn't a directory" unless -d _;
20die "trunk dir isn't readable"    unless -r _;
21die "trunk dir isn't writable"    unless -w _;
22
23my $sa = SVN::Agent->load({ path => $config{'trunk'} });
24$sa->update;
25
26my $program_dir = cwd;
27
28chdir $config{'trunk'};
29system("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       
36my (undef, undef, undef, $day, $month, $year) = localtime(time);
37$year += 1900;
38$month = sprintf("%02d", ++$month);
39
40system("perl Build");
41system("perl Build test verbose=1 2>&1 > $program_dir/reports/test-results-$year-$month-$day.txt");
Note: See TracBrowser for help on using the repository browser.