# possible set of deps *without testing them*. This ensures we stay within
# a reasonable build-time and still run as many of our tests as possible
#
-# * The perl builds and the DBIC tests run under NUMTHREADS number of threads.
+# * The perl builds and the DBIC tests run under VCPU_USE number of threads.
# The testing of dependencies under CLEANTEST runs single-threaded, at least
# until we fix our entire dep-chain to safely pass under -j
#
env:
- CLEANTEST=false
- - CLEANTEST=true NUMTHREADS=1
+ - CLEANTEST=true VCPU_USE=1
matrix:
fast_finish: true
#
# We also divide the result by a factor, otherwise the travis VM gets
# overloaded (the amount of available swap is just TOOOO damn small)
-if [[ -z "$NUMTHREADS" ]] ; then
- export NUMTHREADS="$(( ( $(perl -0777 -n -e 'print (/ (?: .+ ^ processor \s+ : \s+ (\d+) ) (?! ^ processor ) /smx)' < /proc/cpuinfo) + 1 ) / 3 ))"
+export VCPU_AVAILABLE="$(( ( $(perl -0777 -n -e 'print (/ (?: .+ ^ processor \s+ : \s+ (\d+) ) (?! ^ processor ) /smx)' < /proc/cpuinfo) + 1 ) / 3 ))"
+
+if [[ -z "$VCPU_USE" ]] ; then
+ export VCPU_USE="$VCPU_AVAILABLE"
fi
export CACHE_DIR="/tmp/poormanscache"
PERL_CPANM_OPT="$PERL_CPANM_OPT --mirror $CPAN_MIRROR"
# do not set PERLBREW_CPAN_MIRROR - not all backpan-like mirrors have the perl tarballs
-export PERL_MM_USE_DEFAULT=1 PERL_MM_NONINTERACTIVE=1 PERL_AUTOINSTALL_PREFER_CPAN=1 HARNESS_TIMER=1 MAKEFLAGS="-j$NUMTHREADS"
+export PERL_MM_USE_DEFAULT=1 PERL_MM_NONINTERACTIVE=1 PERL_AUTOINSTALL_PREFER_CPAN=1 HARNESS_TIMER=1 MAKEFLAGS="-j$VCPU_USE"
# try CPAN's latest offering if requested
if [[ "$DEVREL_DEPS" == "true" ]] ; then
# since perl 5.14 a perl can safely be built concurrently with -j$large
# (according to brute force testing and my power bill)
if [[ "$BREWVER" == "blead" ]] || perl -Mversion -e "exit !!(version->new(q($BREWVER)) < 5.014)" ; then
- perlbrew_jopt="$NUMTHREADS"
+ perlbrew_jopt="$VCPU_USE"
fi
run_or_err "Compiling/installing Perl $BREWVER (without testing, using ${perlbrew_jopt:-1} threads, may take up to 5 minutes)" \
if [[ -n "$SHORT_CIRCUIT_SMOKE" ]] ; then exit 0 ; fi
run_harness_tests() {
- local -x HARNESS_OPTIONS=c:j$NUMTHREADS
+ local -x HARNESS_OPTIONS=c:j$VCPU_USE
make test 2> >(tee "$TEST_STDERR_LOG")
}
run_or_err "Prepare blib" "make pure_all"
run_harness_tests
else
- PROVECMD="prove -lrswj$NUMTHREADS xt t"
+ PROVECMD="prove -lrswj$VCPU_USE xt t"
# FIXME - temporary, until Package::Stash is fixed
if perl -M5.010 -e 1 &>/dev/null ; then
run_or_err "Installing (without testing) $(echo $MODLIST)" \
"echo \\
\"$MODLIST\" \\
- | xargs -d '\\n' -n 1 -P $NUMTHREADS bash -c \\
+ | xargs -d '\\n' -n 1 -P $VCPU_USE bash -c \\
'OUT=\$(maint/getstatus $TIMEOUT_CMD cpanm --notest \"\$@\" 2>&1 ) || (LASTEXIT=\$?; echo \"\$OUT\"; exit \$LASTEXIT)' \\
'giant space monkey penises'
"
local -x HARNESS_OPTIONS
- HARNESS_OPTIONS="j$NUMTHREADS"
+ HARNESS_OPTIONS="j$VCPU_USE"
if ! run_or_err "Attempting install of $# modules under parallel ($HARNESS_OPTIONS) testing ($MODLIST)" "_dep_inst_with_test $MODLIST" quiet_fail ; then
local errlog="failed after ${DELTA_TIME}s Exit:$LASTEXIT Log:$(/usr/bin/nopaste -q -s Shadowcat -d "Parallel testfail" <<< "$LASTOUT")"