mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 19:12:25 +00:00
Merge branch 'v2docs' of https://github.com/vishaps/voc into v2docs
This commit is contained in:
commit
d2f03dbd18
3 changed files with 30 additions and 8 deletions
0
src/tools/testcoordinator/buildall.pl
Normal file → Executable file
0
src/tools/testcoordinator/buildall.pl
Normal file → Executable file
17
src/tools/testcoordinator/passes.pl
Executable file
17
src/tools/testcoordinator/passes.pl
Executable file
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!perl -w
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use POSIX "strftime";
|
||||||
|
|
||||||
|
# Now parse the combined logs extracting build pass messages
|
||||||
|
# lub32 20.47.55 --- Branch v2docs ubuntu gcc ILP32 confidence tests passed ---
|
||||||
|
|
||||||
|
open(my $buildlog, "</tmp/buildall.log") // die "Could not read buildall.log.";
|
||||||
|
open(my $passes, ">log/buildpasses.log") // die "Could not create buildpasses.log.";
|
||||||
|
while (<$buildlog>) {
|
||||||
|
if (/ --- Branch .* confidence tests passed ---/) {
|
||||||
|
print $passes $_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close($buildlog);
|
||||||
|
close($passes);
|
||||||
21
src/tools/testcoordinator/postpush.pl
Normal file → Executable file
21
src/tools/testcoordinator/postpush.pl
Normal file → Executable file
|
|
@ -9,7 +9,6 @@ use POSIX "strftime";
|
||||||
use CGI qw(:standard escapeHTML);
|
use CGI qw(:standard escapeHTML);
|
||||||
use JSON;
|
use JSON;
|
||||||
|
|
||||||
|
|
||||||
sub writelog {
|
sub writelog {
|
||||||
my ($msg) = @_;
|
my ($msg) = @_;
|
||||||
|
|
||||||
|
|
@ -19,8 +18,6 @@ sub writelog {
|
||||||
close(LOG);
|
close(LOG);
|
||||||
}
|
}
|
||||||
|
|
||||||
writelog "Postpush.";
|
|
||||||
|
|
||||||
my $postdata = from_json(param('POSTDATA'));
|
my $postdata = from_json(param('POSTDATA'));
|
||||||
|
|
||||||
my $url = $postdata->{'repository'}->{'url'};
|
my $url = $postdata->{'repository'}->{'url'};
|
||||||
|
|
@ -32,13 +29,21 @@ my $repo = $url; $repo =~ s'^.*\/'';
|
||||||
|
|
||||||
#my $repo="repo"; my $branch="branch"; my $name="name";
|
#my $repo="repo"; my $branch="branch"; my $name="name";
|
||||||
|
|
||||||
writelog "Repository $repo, branch $branch, name $name.";
|
writelog "Post push github web hook for repository $repo, branch $branch, name $name.";
|
||||||
|
|
||||||
|
|
||||||
|
my $child = fork;
|
||||||
|
if (not defined $child) {die "Fork failed.";}
|
||||||
|
if ($child) {
|
||||||
|
# parent process
|
||||||
|
writelog "Started ssh, pid = $child.";
|
||||||
|
} else {
|
||||||
|
# child process
|
||||||
|
exec 'ssh root@oberon "perl vishap/voc/src/tools/testcoordinator/buildall.pl >/tmp/buildall.log &"';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
print header(),
|
print header(),
|
||||||
start_html("Vishap Oberon github post push web hook."),
|
start_html("Vishap Oberon github post push web hook."),
|
||||||
p("Repository $repo, branch $branch, name $name."),
|
p("Repository $repo, branch $branch, name $name."),
|
||||||
end_html();
|
end_html();
|
||||||
|
|
||||||
system 'ssh root@oberon perl vishap/voc/src/tools/testcoordinator/buildall.pl >/tmp/buildall.log &';
|
|
||||||
|
|
||||||
writelog "Buildall triggered."
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue