do
if [[ -z "${!var}" ]] ; then
export $var=1
- echo "POISON_ENV: setting $var to 1"
+ echo -n "$var "
fi
done
+echo -e "\n\n^^ variables above **automatically** set to '1'"
provecmd="nice prove -QlrswTj10"
-echo -e "\nExecuting \`$provecmd\` via $(which perl)\n"
-$provecmd
+echo -e "
+Executing \`$provecmd $@\` via $(which perl) within the following environment:
+
+$(env | grep -P 'TEST|HARNESS|MAKE|TRAVIS|PERL|DBIC|PATH|SHELL' | LC_ALL=C sort | cat -v)
+"
+
+$provecmd "$@"
die "Unable to retrieve $resp->{url}: $resp->{status}\n$resp->{content}\n\n"
unless $resp->{success};
-my @job_ids = ( map
- { ($_->{id}||'') =~ /^([0-9]+)$/ }
+my @jobs = ( map
+ { ( ($_->{id}||'') =~ /^([0-9]+)$/ ) ? [ $1 => $_->{number} ] : () }
@{( eval { decode_json( $resp->{content} )->{matrix} } || [] )}
-) or die "Unable to find any job ids:\n$resp->{content}\n\n";
+) or die "Unable to find any jobs:\n$resp->{content}\n\n";
my $dir = "TravisCI_build_$build_id";
mkdir $dir
unless -d $dir;
-for my $job_id (@job_ids) {
- my $log_url = "http://api.travis-ci.org/jobs/$job_id/log.txt";
- my $dest_fn = "$dir/job_$job_id.log";
+for my $job (@jobs) {
+ my $log_url = "http://api.travis-ci.org/jobs/$job->[0]/log.txt";
+ my $dest_fn = "$dir/job_$job->[1].$job->[0].log";
print "Retrieving $log_url into $dest_fn\n";