From e0f9ce9218fe3151fe6e395038bcd088dbafad2a Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sat, 8 Jan 2011 01:44:59 -0800 Subject: Add ability to disable perlbrew This option comes in handy for those that want to run long test suites on just one version of Perl and/or those using local::lib (which doesn't play nice with perlbrew with XS modules). --- scripts/capsule.sh | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) (limited to 'scripts') diff --git a/scripts/capsule.sh b/scripts/capsule.sh index 7411639..cd102a7 100755 --- a/scripts/capsule.sh +++ b/scripts/capsule.sh @@ -3,27 +3,36 @@ # first arg: build_dir # second arg: report path +# this is getting smelly builddir=$1 report_path=$2 +perlbrew=$3 echo "Creating report_path=$report_path" 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)" - - echo ">perlbrew switch $theperl" - perlbrew switch $theperl - # TODO: check error condition - - perlversion=$(perl -v) - logfile="$report_path/$theperl.txt" - +if [ $use_perlbrew ]; then + source $HOME/perl5/perlbrew/etc/bashrc + for perl in $HOME/perl5/perlbrew/perls/perl-5.* + do + theperl="$(basename $perl)" + + echo ">perlbrew switch $theperl" + perlbrew switch $theperl + # TODO: check error condition + + logfile="$report_path/$theperl.txt" + jitterbug_build + done +else + theperl="$(basename perl -e \"print $]\")" + logfile="$report_path/$theperl.txt" + jitterbug_build +fi + +function jitterbug_build () { if [ -f 'dist.ini' ]; then echo "Found dist.ini, using Dist::Zilla" dzil authordeps | cpanm @@ -42,4 +51,4 @@ do make HARNESS_VERBOSE=1 make test >> $logfile 2>&1 fi -done +} -- cgit v1.2.3 From 512cb117b8c45c6770c2e8bec5c0bd32902492c0 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sun, 9 Jan 2011 01:01:41 -0800 Subject: Function must be defined before it is used --- scripts/capsule.sh | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'scripts') diff --git a/scripts/capsule.sh b/scripts/capsule.sh index cd102a7..45188f0 100755 --- a/scripts/capsule.sh +++ b/scripts/capsule.sh @@ -3,6 +3,27 @@ # first arg: build_dir # second arg: report path +function jitterbug_build () { + if [ -f 'dist.ini' ]; then + echo "Found dist.ini, using Dist::Zilla" + dzil authordeps | cpanm + cpanm --installdeps . + HARNESS_VERBOSE=1 dzil test >> $logfile 2>&1 + elif [ -f 'Build.PL' ]; then + echo "Found Build.PL, using Build.PL" + perl Build.PL + # ./Build installdeps is not available in older Module::Build's + cpanm --installdeps . + HARNESS_VERBOSE=1 ./Build test --verbose >> $logfile 2>&1 + else + echo "Hoping to find Makefile.PL" + perl Makefile.PL + cpanm --installdeps . + make + HARNESS_VERBOSE=1 make test >> $logfile 2>&1 + fi +} + # this is getting smelly builddir=$1 report_path=$2 @@ -31,24 +52,3 @@ else logfile="$report_path/$theperl.txt" jitterbug_build fi - -function jitterbug_build () { - if [ -f 'dist.ini' ]; then - echo "Found dist.ini, using Dist::Zilla" - dzil authordeps | cpanm - cpanm --installdeps . - HARNESS_VERBOSE=1 dzil test >> $logfile 2>&1 - elif [ -f 'Build.PL' ]; then - echo "Found Build.PL, using Build.PL" - perl Build.PL - # ./Build installdeps is not available in older Module::Build's - cpanm --installdeps . - HARNESS_VERBOSE=1 ./Build test --verbose >> $logfile 2>&1 - else - echo "Hoping to find Makefile.PL" - perl Makefile.PL - cpanm --installdeps . - make - HARNESS_VERBOSE=1 make test >> $logfile 2>&1 - fi -} -- cgit v1.2.3 From 969b62c1be0b8e3b548ad1ba395d09f6393b89b8 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sun, 9 Jan 2011 01:21:56 -0800 Subject: Attempt grab perl version correctly --- scripts/capsule.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/capsule.sh b/scripts/capsule.sh index 45188f0..818dcf4 100755 --- a/scripts/capsule.sh +++ b/scripts/capsule.sh @@ -38,17 +38,17 @@ if [ $use_perlbrew ]; then source $HOME/perl5/perlbrew/etc/bashrc for perl in $HOME/perl5/perlbrew/perls/perl-5.* do - theperl="$(basename $perl)" + theperl="$(perl -e \"print $]\")" + logfile="$report_path/perl-$theperl.txt" echo ">perlbrew switch $theperl" perlbrew switch $theperl # TODO: check error condition - logfile="$report_path/$theperl.txt" jitterbug_build done else - theperl="$(basename perl -e \"print $]\")" - logfile="$report_path/$theperl.txt" + theperl="$(perl -e \"print $]\")" + logfile="$report_path/perl-$theperl.txt" jitterbug_build fi -- cgit v1.2.3 From 87e5699a92b74e4b5ea53ed990a776e322c56a90 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sun, 9 Jan 2011 01:26:56 -0800 Subject: Use a stringified version object, because it is prettier --- scripts/capsule.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/capsule.sh b/scripts/capsule.sh index 818dcf4..c91d50a 100755 --- a/scripts/capsule.sh +++ b/scripts/capsule.sh @@ -38,7 +38,7 @@ if [ $use_perlbrew ]; then source $HOME/perl5/perlbrew/etc/bashrc for perl in $HOME/perl5/perlbrew/perls/perl-5.* do - theperl="$(perl -e \"print $]\")" + theperl=$(perl -e 'print $^V') logfile="$report_path/perl-$theperl.txt" echo ">perlbrew switch $theperl" @@ -48,7 +48,7 @@ if [ $use_perlbrew ]; then jitterbug_build done else - theperl="$(perl -e \"print $]\")" + theperl=$(perl -e 'print $^V') logfile="$report_path/perl-$theperl.txt" jitterbug_build fi -- cgit v1.2.3 From b1a5bddc4c42308942d007ad71654f4bf4c0f282 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 10 Jan 2011 14:08:27 -0800 Subject: Add the ability to CC an email when builds fail --- scripts/build-failed.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/build-failed.sh b/scripts/build-failed.sh index 43463b3..644e35f 100755 --- a/scripts/build-failed.sh +++ b/scripts/build-failed.sh @@ -2,10 +2,11 @@ COMMITER=$1 MESSAGE=$2 OUTPUT=$3 SHA=$4 +CC_EMAIL=$5 echo " Message: $MESSAGE $OUTPUT -" | mail -s "[jitterbug] BUILD FAILED $SHA" $COMMITER +" | mail -c "$CC_EMAIL" -s "[jitterbug] BUILD FAILED $SHA" $COMMITER -- cgit v1.2.3 From 0f24016d696f5a7fbac7de7e7712c8e26278bc8f Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Tue, 11 Jan 2011 10:47:35 -0800 Subject: Attempt to fix the mangled build failure email bug --- scripts/build-failed.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'scripts') diff --git a/scripts/build-failed.sh b/scripts/build-failed.sh index 644e35f..1be5cd2 100755 --- a/scripts/build-failed.sh +++ b/scripts/build-failed.sh @@ -4,9 +4,4 @@ OUTPUT=$3 SHA=$4 CC_EMAIL=$5 -echo " -Message: -$MESSAGE - -$OUTPUT -" | mail -c "$CC_EMAIL" -s "[jitterbug] BUILD FAILED $SHA" $COMMITER +echo "Message:\n$MESSAGE\nTest Output:\n$OUTPUT\n" | mail -c "$CC_EMAIL" -s "[jitterbug] BUILD FAILED $SHA" $COMMITER -- cgit v1.2.3 From 490c240d5f70ca5c7fabd747ec6bfb7e218eeef7 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Tue, 11 Jan 2011 15:38:50 -0500 Subject: Make build failure email more useful by including TAP output --- scripts/build-failed.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/build-failed.sh b/scripts/build-failed.sh index 1be5cd2..ebd098a 100755 --- a/scripts/build-failed.sh +++ b/scripts/build-failed.sh @@ -1,7 +1,14 @@ COMMITER=$1 -MESSAGE=$2 -OUTPUT=$3 -SHA=$4 -CC_EMAIL=$5 +PROJECT=$2 +MESSAGE=$3 +OUTPUT=$4 +SHA=$5 +CC_EMAIL=$6 -echo "Message:\n$MESSAGE\nTest Output:\n$OUTPUT\n" | mail -c "$CC_EMAIL" -s "[jitterbug] BUILD FAILED $SHA" $COMMITER +echo " +Message: +$MESSAGE + +Test Output: +$OUTPUT +" | mail -c "$CC_EMAIL" -s "[jitterbug] FAIL $PROJECT @ $SHA" $COMMITER -- cgit v1.2.3 From 8d17111416abf16574189ee345c72b0cfe439f97 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Tue, 18 Jan 2011 18:44:39 -0800 Subject: Add support for testing some Parrot and Perl 6 projects --- scripts/capsule.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scripts') diff --git a/scripts/capsule.sh b/scripts/capsule.sh index c91d50a..419f3b2 100755 --- a/scripts/capsule.sh +++ b/scripts/capsule.sh @@ -15,6 +15,12 @@ function jitterbug_build () { # ./Build installdeps is not available in older Module::Build's cpanm --installdeps . HARNESS_VERBOSE=1 ./Build test --verbose >> $logfile 2>&1 + elif [ -f 'setup.pir' ]; then + echo "Found setup.pir" + HARNESS_VERBOSE=1 parrot setup.pir test >> $logfile 2>&1 + elif [ -f 'setup.nqp' ]; then + echo "Found setup.nqp" + HARNESS_VERBOSE=1 parrot-nqp setup.nqp test >> $logfile 2>&1 else echo "Hoping to find Makefile.PL" perl Makefile.PL -- cgit v1.2.3 From e398651ae5caa8b80c3e65bc1c40b8ac6a69f5c6 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Tue, 18 Jan 2011 18:54:06 -0800 Subject: Add support for building+testing Parrot VM and Rakudo Perl 6 --- scripts/capsule.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/capsule.sh b/scripts/capsule.sh index 419f3b2..abc632d 100755 --- a/scripts/capsule.sh +++ b/scripts/capsule.sh @@ -15,17 +15,21 @@ function jitterbug_build () { # ./Build installdeps is not available in older Module::Build's cpanm --installdeps . HARNESS_VERBOSE=1 ./Build test --verbose >> $logfile 2>&1 + elif [ -f 'Makefile.PL' ]; then + echo "Found Makefile.PL" + perl Makefile.PL + cpanm --installdeps . + HARNESS_VERBOSE=1 make test >> $logfile 2>&1 elif [ -f 'setup.pir' ]; then echo "Found setup.pir" HARNESS_VERBOSE=1 parrot setup.pir test >> $logfile 2>&1 elif [ -f 'setup.nqp' ]; then echo "Found setup.nqp" HARNESS_VERBOSE=1 parrot-nqp setup.nqp test >> $logfile 2>&1 - else - echo "Hoping to find Makefile.PL" - perl Makefile.PL + elif [ -f 'Configure.pl' ]; then + echo "Found Configure.pl" + perl Configure.pl cpanm --installdeps . - make HARNESS_VERBOSE=1 make test >> $logfile 2>&1 fi } -- cgit v1.2.3