Change the repository URL to https, bump version, ready to release
[cpan-testers-parsereport.git] / t / ctgr-live.t
blob3dce18226fab9f2f4a3c19a008570bfb156587ee
1 #!perl -- -*- mode: cperl -*-
3 use strict;
4 BEGIN {
5     my $exit_message = "";
6     unless ($exit_message) {
7         if (!$ENV{AUTHOR_TEST}) {
8             $exit_message = "envariable AUTHOR_TEST not set";
9         }
10     }
11     if ($exit_message) {
12         $|=1;
13         print "1..0 # SKIP $exit_message\n";
14         eval "require POSIX; 1" and POSIX::_exit(0);
15     }
18 use File::Path qw(mkpath);
19 use Test::More;
20 use File::Spec;
21 use CPAN::Testers::ParseReport;
22 use Time::HiRes qw(time);
24 my $plan;
27     BEGIN { $plan += 1 }
28     mkpath "t/var-live";
29     my $system = qq{"$^X" "-Ilib" "bin/ctgetreports" "--prefer-local-reports" "--cachedir" "t/var-live" "--solve" "--verbose" "--transport" "http_cpantesters_gzip" "Scriptalicious-1.16" 2>&1};
30     diag "running system='$system'";
31     my $start = time;
32     open my $fh, "-|", $system or die "could not fork: $!";
33     my @reg;
34     while (<$fh>) {
35         push @reg, $1 if /^Regression '(.+)'/;
36     }
37     my $duration = time - $start;
38     @reg = sort @reg; # make it a bit less fragile
39     is "@reg",
40         "conf:archname+osvers fail:t/04-fork.t meta:osname+perl",
41         "found the 'right' top 3 candidates in $duration seconds; (a very fragile test)";
44 unlink "ctgetreports.out";
46 BEGIN {
47       plan tests => $plan;
50 __END__
52 # Local Variables:
53 # mode: cperl
54 # cperl-indent-level: 4
55 # End: