Skip to content

Commit

Permalink
Create html of test suites run during regress.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluhm committed Apr 25, 2018
1 parent 8e3b10c commit a372d5d
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
1 change: 1 addition & 0 deletions README
Expand Up @@ -15,6 +15,7 @@ run.pl - do everything, add this to cron job
setup-html.pl - convert machine setup logs into html table
setup.pl - install one test machine,
this is started by run.pl
testsuite-html.pl - create html of test suites run during regress
site.list - list of config files that must be installed on test machine
test.list - list of /usr/src/regress subdirectories that should be tested

Expand Down
64 changes: 64 additions & 0 deletions testsuite-html.pl
@@ -0,0 +1,64 @@
#!/usr/bin/perl
# collect all os-test results and create a html table
# os-test package must be installed

# Copyright (c) 2018 Alexander Bluhm <bluhm@genua.de>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

use strict;
use warnings;
use Cwd;
use Getopt::Std;

my %opts;
getopts('h:l', \%opts) or do {
print STDERR <<"EOF";
usage: $0 -p publish
-t publish directory where the test suite results are created
EOF
exit(2);
};
my $publish = $opts{p} or die "No -p specified";
$publish = getcwd(). "/". $publish if substr($publish, 0, 1) ne "/";

my $dir = dirname($0). "/..";
chdir($dir)
or die "Chdir to '$dir' failed: $!";
my $regressdir = getcwd();

my $latest = readlink "latest";
my @latesthost = map { readlink $_ or () } glob("latest-*");

my $testsuite = "os-test";

$dir = "$publish/$testsuite";
make_path("$dir/out") or die "make path '$dir/out' failed: $!";
chdir($dir)
or die "Chdir to '$dir' failed: $!";

if ($latest) {
my $obj = "$regressdir/$latest/test.obj.tgz";
my @pax = ("pax", "-zrf", $obj, "-s,^/misc/$testsuite/,,",
"/misc/$testsuite/");
system(@pax)
and die "Command '@pax' failed: $?";
}

foreach my $date (@latesthost) {
my $obj = "$regressdir/$date/test.obj.tgz";
my @pax = ("pax", "-zrf", $obj, "-s,^/misc/$testsuite/,out/$date/,",
"/misc/$testsuite/");
system(@pax)
and die "Command '@pax' failed: $?";
}

0 comments on commit a372d5d

Please sign in to comment.