Centralize all user-side rsrc calls to go through result_source()
[dbsrgits/DBIx-Class.git] / maint / poisonsmoke.bash
1 #!/bin/bash
2
3 set -e
4
5 [[ -e Makefile.PL ]] || ( echo "Not in the right dir" && exit 1 )
6
7 clear
8 echo
9
10 export TRAVIS=true
11 export TRAVIS_REPO_SLUG="x/dbix-class"
12 export DBI_DSN="dbi:ODBC:server=NonexistentServerAddress"
13 export DBI_DRIVER="ADO"
14
15 toggle_booleans=( \
16   $( grep -ohP '\bDBIC_[0-9_A-Z]+' -r lib/ --exclude-dir Optional | sort -u | grep -vP '^(DBIC_TRACE(_PROFILE)?|DBIC_.+_DEBUG)$' ) \
17   DBIC_SHUFFLE_UNORDERED_RESULTSETS \
18   DBICTEST_ASSERT_NO_SPURIOUS_EXCEPTION_ACTION \
19   DBICTEST_RUN_ALL_TESTS \
20   DBICTEST_SQLITE_REVERSE_DEFAULT_ORDER \
21 )
22
23 for var in "${toggle_booleans[@]}"
24 do
25   if [[ -z "${!var}" ]] ; then
26     export $var=1
27     echo -n "$var "
28   fi
29 done
30 echo -e "\n\n^^ variables above **automatically** set to '1'"
31
32 provecmd="nice prove -QlrswTj10"
33
34 echo -e "
35 Executing \`$provecmd $@\` via $(which perl) within the following environment:
36
37 $(env | grep -P 'TEST|HARNESS|MAKE|TRAVIS|PERL|DBIC|PATH|SHELL' | LC_ALL=C sort | cat -v)
38 "
39
40 $provecmd "$@"