Skip to content

Commit 179566f

Browse files
committed
(travis) Reorganize POISON_ENV mode
Allow MVDT and BREAK_CC to be separate settings, will make sense in further commits. This adds extra testing of DEVREL_DEPS with no compiler, which brings another round of exceptions etc... sigh Read under -w
1 parent e5b2f13 commit 179566f

File tree

3 files changed

+47
-20
lines changed

3 files changed

+47
-20
lines changed

maint/travis-ci_scripts/20_install.bash

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,17 @@ fi
8686
# poison the environment
8787
if [[ "$POISON_ENV" = "true" ]] ; then
8888

89+
toggle_vars=( MVDT )
90+
91+
[[ "$CLEANTEST" == "true" ]] && toggle_vars+=( BREAK_CC )
92+
93+
for var in "${toggle_vars[@]}" ; do
94+
if [[ -z "${!var}" ]] ; then
95+
export $var=true
96+
echo "POISON_ENV: setting $var to 'true'"
97+
fi
98+
done
99+
89100
# look through lib, find all mentioned DBIC* ENVvars and set them to true and see if anything explodes
90101
toggle_booleans=( $( grep -ohP '\bDBIC_[0-9_A-Z]+' -r lib/ --exclude-dir Optional | sort -u | grep -vP '^(DBIC_TRACE(_PROFILE)?|DBIC_.+_DEBUG)$' ) )
91102

maint/travis-ci_scripts/30_before_script.bash

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ source maint/travis-ci_scripts/common.bash
55

66
if [[ -n "$SHORT_CIRCUIT_SMOKE" ]] ; then exit 0 ; fi
77

8-
# The prereq-install stage will not work with both POISON and DEVREL
8+
# The DEVREL_DEPS prereq-install stage won't mix with MVDT
99
# DEVREL wins
10-
if [[ "$DEVREL_DEPS" = "true" ]] ; then
11-
export POISON_ENV=""
10+
if [[ "$DEVREL_DEPS" == "true" ]] ; then
11+
export MVDT=""
1212
fi
1313

1414
# FIXME - this is a kludge in place of proper MDV testing. For the time
1515
# being simply use the minimum versions of our DBI/DBDstack, to avoid
1616
# fuckups like 0.08260 (went unnoticed for 5 months)
17-
if [[ "$POISON_ENV" = "true" ]] ; then
17+
if [[ "$MVDT" == "true" ]] ; then
1818

1919
# use url-spec for DBI due to https://github.com/miyagawa/cpanminus/issues/328
2020
if [[ "$CLEANTEST" != "true" ]] || perl -M5.013003 -e1 &>/dev/null ; then
@@ -32,25 +32,38 @@ if [[ "$POISON_ENV" = "true" ]] ; then
3232
else
3333
parallel_installdeps_notest DBD::SQLite@1.29
3434
fi
35+
fi
3536

36-
# also try minimal tested installs *without* a compiler
37-
if [[ "$CLEANTEST" = "true" ]]; then
37+
#
38+
# try minimal fully tested installs *without* a compiler (with some exceptions of course)
39+
if [[ "$BREAK_CC" == "true" ]] ; then
3840

39-
# FIXME - working around RT#74707, https://metacpan.org/source/DOY/Package-Stash-0.37/Makefile.PL#L112-122
40-
# List::Util can be excised after that as well (need to make my own max() routine for older perls)
41-
installdeps Sub::Name Clone Package::Stash::XS \
42-
$( perl -MList::Util\ 1.16 -e1 &>/dev/null || echo "List::Util" )
41+
[[ "$CLEANTEST" != "true" ]] && echo_err "Breaking the compiler without CLEANTEST makes no sense" && exit 1
4342

44-
mkdir -p "$HOME/bin" # this is already in $PATH, just doesn't exist
45-
run_or_err "Linking ~/bin/cc to /bin/false - thus essentially BREAKING the C compiler" \
46-
"ln -s /bin/false $HOME/bin/cc"
43+
# FIXME - working around RT#74707, https://metacpan.org/source/DOY/Package-Stash-0.37/Makefile.PL#L112-122
44+
# List::Util can be excised after that as well (need to make my own max() routine for older perls)
45+
#
46+
# DEVREL_DEPS means our installer is cpanm, which will respect failures
47+
# and the like, so stuff soft-failing (failed deps that are not in fact
48+
# needed) will not fly. Add *EVEN MORE* stuff that needs a compiler
49+
#
50+
# FIXME - the PathTools 3.47 is to work around https://rt.cpan.org/Ticket/Display.html?id=107392
51+
#
52+
installdeps Sub::Name Clone Package::Stash::XS \
53+
$( perl -MList::Util\ 1.16 -e1 &>/dev/null || echo "List::Util" ) \
54+
$( [[ "$DEVREL_DEPS" == "true" ]] && ( perl -MFile::Spec\ 3.13 -e1 &>/dev/null || echo "S/SM/SMUELLER/PathTools-3.47.tar.gz" ) ) \
55+
$( perl -MDBI -e1 &>/dev/null || echo "DBI" ) \
56+
$( perl -MDBD::SQLite -e1 &>/dev/null || echo "DBD::SQLite" )
4757

48-
# FIXME: working around RT#113682, RT#113685
49-
installdeps Module::Build B::Hooks::EndOfScope
58+
mkdir -p "$HOME/bin" # this is already in $PATH, just doesn't exist
59+
run_or_err "Linking ~/bin/cc to /bin/false - thus essentially BREAKING the C compiler" \
60+
"ln -s /bin/false $HOME/bin/cc"
5061

51-
run_or_err "Linking ~/bin/cc to /bin/true - BREAKING the C compiler even harder" \
52-
"ln -fs /bin/true $HOME/bin/cc"
53-
fi
62+
# FIXME: working around RT#113682, RT#113685, and some other unfiled bugs
63+
installdeps Module::Build B::Hooks::EndOfScope Devel::GlobalDestruction Class::Accessor::Grouped
64+
65+
run_or_err "Linking ~/bin/cc to /bin/true - BREAKING the C compiler even harder" \
66+
"ln -fs /bin/true $HOME/bin/cc"
5467
fi
5568

5669
if [[ "$CLEANTEST" = "true" ]]; then
@@ -169,8 +182,8 @@ if [[ -n "$(make listdeps)" ]] ; then
169182
exit 1
170183
fi
171184

172-
# check that our MDV somewhat works
173-
if [[ "$POISON_ENV" = "true" ]] && ( perl -MDBD::SQLite\ 1.38 -e1 || perl -MDBI\ 1.615 -e1 ) &>/dev/null ; then
185+
# check that our MVDT somewhat works
186+
if [[ "$MVDT" == "true" ]] && ( perl -MDBD::SQLite\ 1.38 -e1 || perl -MDBI\ 1.615 -e1 ) &>/dev/null ; then
174187
echo_err "Something went wrong - higher versions of DBI and/or DBD::SQLite than we expected"
175188
exit 1
176189
fi

maint/travis-ci_scripts/50_after_success.bash

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ export HARNESS_OPTIONS="j$VCPU_USE"
1111

1212

1313
if [[ "$DEVREL_DEPS" == "true" ]] && perl -M5.008003 -e1 &>/dev/null ; then
14+
15+
[[ "$BREAK_CC" == "true" ]] && run_or_err "Unbreaking previously broken ~/bin/cc" "rm $HOME/bin/cc"
16+
1417
# FIXME - Devel::Cover (brought by Test::Strict, but soon needed anyway)
1518
# does not test cleanly on 5.8.7 - just get it directly
1619
if perl -M5.008007 -e1 &>/dev/null && ! perl -M5.008008 -e1 &>/dev/null; then

0 commit comments

Comments
 (0)