Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 86 lines (76 sloc) 2.539 kb
a258bae @leto Improve smolder_mathgsl and wrapper script smoke_some_mathgsl
authored
1 #!/usr/local/bin/perl5.10 -w
f79262c @leto Bump version and add preliminary smolder_mathgsl script to ./bin
authored
2 use strict;
3 use warnings;
4 use Config;
5 use TAP::Harness::Archive;
6 use Data::Dumper;
a258bae @leto Improve smolder_mathgsl and wrapper script smoke_some_mathgsl
authored
7 use lib 'lib';
8 use Math::GSL;
f79262c @leto Bump version and add preliminary smolder_mathgsl script to ./bin
authored
9 $|++;
10
11 my $archive = shift || 'my_test_run.tar.gz';
12 my $server = 'smolder.plusthree.com';
13 my ($user,$pass) = qw/leto bessel_J0/;
14 my $archname = $Config{archname};
15 if ($archname =~ /darwin/i){
16 $archname = `uname -p`;
17 }
18 my $me = $^O eq 'MSWin32' ? $ENV{'USERNAME'}
19 : $ENV{'LOGNAME'} || eval { getpwuid($<) };
20
21 my $domain = 'unknown';
22 if ($^O eq 'MSWin32') {
23 $domain = $ENV{'USERDOMAIN'};
24 } else {
25 eval { require Sys::Hostname; $domain = Sys::Hostname::hostname(); };
26 }
27
a258bae @leto Improve smolder_mathgsl and wrapper script smoke_some_mathgsl
authored
28 my ($git_id,$git_branch) = ('','');
29
f79262c @leto Bump version and add preliminary smolder_mathgsl script to ./bin
authored
30 if ( -e '.git' ) {
a258bae @leto Improve smolder_mathgsl and wrapper script smoke_some_mathgsl
authored
31 chomp($git_id = `git log -p -n 1|grep commit`);
f79262c @leto Bump version and add preliminary smolder_mathgsl script to ./bin
authored
32 $git_id =~ s/commit //;
a258bae @leto Improve smolder_mathgsl and wrapper script smoke_some_mathgsl
authored
33 chomp($git_branch = `git branch | grep "^\*"`);
f79262c @leto Bump version and add preliminary smolder_mathgsl script to ./bin
authored
34 $git_branch =~ s/\* //;
35 }
36 my $properties = {
a258bae @leto Improve smolder_mathgsl and wrapper script smoke_some_mathgsl
authored
37 'Math::GSL' => $Math::GSL::VERSION,
38 'Git Commit' => $git_id,
f79262c @leto Bump version and add preliminary smolder_mathgsl script to ./bin
authored
39 'Git Branch' => $git_branch,
40 'Submitter' => "$me\@$domain",
41 'Perl Version' => $Config{version},
42 'Config Args' => $Config{config_args},
43 'CC Flags' => $Config{ccflags},
44 'Double Size' => $Config{doublesize},
45 'Long Doubles' => $Config{uselongdouble},
46 'Multiplicity' => $Config{usemultiplicity},
47 '64bit ints' => $Config{use64bitint},
48 '64bit all' => $Config{use64bitall},
49 'Patch level' => $Config{version_patchlevel_string},
a258bae @leto Improve smolder_mathgsl and wrapper script smoke_some_mathgsl
authored
50 'Perl @INC' => join(":",@INC),
51 'PERL5LIB' => $ENV{PERL5LIB},
f79262c @leto Bump version and add preliminary smolder_mathgsl script to ./bin
authored
52 };
53 my @files = glob('t/*.t');
54 my %options = (
55 verbosity => 0,
a258bae @leto Improve smolder_mathgsl and wrapper script smoke_some_mathgsl
authored
56 jobs => 2,
f79262c @leto Bump version and add preliminary smolder_mathgsl script to ./bin
authored
57 merge => 1,
58 lib => [ 'lib', 'blib/lib', 'blib/arch' ],
59 archive => $archive,
60 extra_properties => $properties,
61 extra_files => [ ],
62 );
63
64
65 my $harness = TAP::Harness::Archive->new(\%options);
66 $harness->runtests(@files);
a258bae @leto Improve smolder_mathgsl and wrapper script smoke_some_mathgsl
authored
67 my $cmd;
f79262c @leto Bump version and add preliminary smolder_mathgsl script to ./bin
authored
68
a258bae @leto Improve smolder_mathgsl and wrapper script smoke_some_mathgsl
authored
69 $cmd =<<CMD;
f79262c @leto Bump version and add preliminary smolder_mathgsl script to ./bin
authored
70 smolder_smoke_signal --server $server \\
71 --username $user --password $pass --file $archive \\
a258bae @leto Improve smolder_mathgsl and wrapper script smoke_some_mathgsl
authored
72 --project Math::GSL --platform $Config{osname} --architecture $archname \\
73 --tags "\$USER , Math::GSL $Math::GSL::VERSION, $git_branch, Perl $Config{version}"
f79262c @leto Bump version and add preliminary smolder_mathgsl script to ./bin
authored
74 CMD
a258bae @leto Improve smolder_mathgsl and wrapper script smoke_some_mathgsl
authored
75 print "about to do:\n$cmd\n";
f79262c @leto Bump version and add preliminary smolder_mathgsl script to ./bin
authored
76
77 system $cmd;
78
79 if ($? == -1) {
80 print "failed to execute: $!\n";
81 } elsif ($? & 127) {
82 printf "smolder_smoke_signal died with signal %d, %s coredump\n", ($? & 127), ($? & 128) ? 'with' : 'without';
83 } else {
84 printf "smolder_smoke_signal exited with value %d\n", $? >> 8;
85 }
Something went wrong with that request. Please try again.