# add an escape for these perls ON SMOKERS - a user will still get death
PEEPEENESS => ( eval { DBICTest::RunMode->is_smoker } && ( "$]" >= 5.013005 and "$]" <= 5.013006) ),
- SHUFFLE_UNORDERED_RESULTSETS => $ENV{DBIC_SHUFFLE_UNORDERED_RESULTSETS} ? 1 : 0,
-
- ASSERT_NO_INTERNAL_WANTARRAY => $ENV{DBIC_ASSERT_NO_INTERNAL_WANTARRAY} ? 1 : 0,
-
- ASSERT_NO_INTERNAL_INDIRECT_CALLS => $ENV{DBIC_ASSERT_NO_INTERNAL_INDIRECT_CALLS} ? 1 : 0,
-
- STRESSTEST_UTF8_UPGRADE_GENERATED_COLLAPSER_SOURCE => $ENV{DBIC_STRESSTEST_UTF8_UPGRADE_GENERATED_COLLAPSER_SOURCE} ? 1 : 0,
-
- STRESSTEST_COLUMN_INFO_UNAWARE_STORAGE => $ENV{DBIC_STRESSTEST_COLUMN_INFO_UNAWARE_STORAGE} ? 1 : 0,
+ ( map
+ #
+ # the "DBIC_" prefix below is crucial - this is what makes CI pick up
+ # all envvars without further adjusting its scripts
+ # DO NOT CHANGE to the more logical { $_ => !!( $ENV{"DBIC_$_"} ) }
+ #
+ { substr($_, 5) => !!( $ENV{$_} ) }
+ qw(
+ DBIC_SHUFFLE_UNORDERED_RESULTSETS
+ DBIC_ASSERT_NO_INTERNAL_WANTARRAY
+ DBIC_ASSERT_NO_INTERNAL_INDIRECT_CALLS
+ DBIC_STRESSTEST_UTF8_UPGRADE_GENERATED_COLLAPSER_SOURCE
+ DBIC_STRESSTEST_COLUMN_INFO_UNAWARE_STORAGE
+ )
+ ),
IV_SIZE => $Config{ivsize},
"
run_or_err "Configuring CPAN.pm" "perl -e '$CPAN_CFG_SCRIPT'"
+
+# These envvars are always set, more *maybe* below
+export DBIC_SHUFFLE_UNORDERED_RESULTSETS=1
+
+# bogus nonexisting DBI_*
+export DBI_DSN="dbi:ODBC:server=NonexistentServerAddress"
+export DBI_DRIVER="ADO"
+
+# some people do in fact set this - boggle!!!
+# it of course won't work before 5.8.4
+if perl -M5.008004 -e 1 &>/dev/null ; then
+ export PERL_STRICTURES_EXTRA=1
+fi
+
+
# poison the environment
if [[ "$POISON_ENV" = "true" ]] ; then
# look through lib, find all mentioned DBIC* ENVvars and set them to true and see if anything explodes
- toggle_booleans=( $(grep -P '\$ENV\{' -r lib/ --exclude-dir Optional | grep -oP '\bDBIC\w+' | sort -u | grep -vP '^(DBIC_TRACE(_PROFILE)?|DBIC_.+_DEBUG)$') )
+ toggle_booleans=( $( grep -ohP '\bDBIC_[0-9_A-Z]+' -r lib/ --exclude-dir Optional | sort -u | grep -vP '^(DBIC_TRACE(_PROFILE)?|DBIC_.+_DEBUG)$' ) )
# some extra pollutants
toggle_booleans+=( \
toggle_booleans+=( DBICTEST_VIA_REPLICATED )
fi
- # some people do in fact set this - boggle!!!
- # it of course won't work before 5.8.4
- if perl -M5.008004 -e 1 &>/dev/null ; then
- toggle_booleans+=( PERL_STRICTURES_EXTRA )
- fi
-
for var in "${toggle_booleans[@]}"
do
if [[ -z "${!var}" ]] ; then
fi
done
- # bogus nonexisting DBI_*
- export DBI_DSN="dbi:ODBC:server=NonexistentServerAddress"
- export DBI_DRIVER="ADO"
-
# emulate a local::lib-like env
# trick cpanm into executing true as shell - we just need the find+unpack
run_or_err "Downloading latest stable DBIC from CPAN" \
use warnings;
no warnings 'once';
-BEGIN { $ENV{DBICTEST_VIA_REPLICATED} = 0 }
+BEGIN {
+ delete @ENV{qw(
+ DBIC_TRACE
+ DBIC_TRACE_PROFILE
+ DBICTEST_SQLITE_USE_FILE
+ DBICTEST_VIA_REPLICATED
+ )};
+}
use Test::More;
use Test::Exception;
use DBICTest;
use Path::Class qw/file/;
-BEGIN { delete @ENV{qw(DBIC_TRACE DBIC_TRACE_PROFILE DBICTEST_SQLITE_USE_FILE)} }
-
my $schema = DBICTest->init_schema();
my $lfn = file("t/var/sql-$$.log");
use Test::More;
+# so we can see the retry exceptions (if any)
+BEGIN { $ENV{DBIC_STORAGE_RETRY_DEBUG} = 1 }
+
use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
# to induce out-of-order destruction
$DBICTest::FakeSchemaFactory::schema = $schema;
- # so we can see the retry exceptions (if any)
- $ENV{DBIC_DBIRETRY_DEBUG} = 1;
-
ok (!$schema->storage->connected, "$type: start disconnected");
$schema->txn_do (sub {