summary refs log tree commit diff
path: root/scripts/capsule.sh
blob: b4be0d9a48f4a0aecab05aca19421a207702bcca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash

# first arg:  build_dir
# second arg: report path

builddir=$1
report_path=$2

mkdir -p $report_path

cd $builddir

source $HOME/perl5/perlbrew/etc/bashrc

for perl in $HOME/perl5/perlbrew/perls/perl-5.*
do
    theperl="$(basename $perl)"
    perlbrew switch $theperl

    perlversion=$(perl -v)
    logfile="$report_path/$theperl.txt"

    if [ -f 'dist.ini' ]; then
        dzil authordeps | cpanm
        cpanm --installdeps .
        HARNESS_VERBOSE=1 dzil test >> $logfile  2>&1
    elif [ -f 'Build.PL' ]; then
        perl Build.PL
        ./Build installdeps
        HARNESS_VERBOSE=1 ./Build test >> $logfile 2>&1
    else
        perl Makefile.PL
        cpanm --installdeps .
        make
        HARNESS_VERBOSE=1 make test >> $logfile 2>&1
    fi
done