Make sure tests pass without a compiler present (another step to RT#74706)
Peter Rabbitson [Tue, 19 May 2015 03:49:48 +0000 (05:49 +0200)]
.travis.yml
Changes
maint/travis-ci_scripts/30_before_script.bash
t/52leaks.t

index 359a9e9..bb651c0 100644 (file)
@@ -86,6 +86,7 @@ matrix:
     - perl: 5.8.3_nt_mb
       env:
         - CLEANTEST=true
+        - POISON_ENV=true
         - DBIC_TRACE_PROFILE=console_monochrome
         - BREWVER=5.8.3
         - BREWOPTS="-Dusemorebits"
@@ -121,10 +122,11 @@ matrix:
         - BREWVER=5.8.8
         - BREWOPTS="-Duseithreads -Dusemorebits"
 
-    # CLEANTEST: this is the perl suse ships
+    # CLEANTEST: this is the perl suse ships, with env poisoning
     - perl: 5.10.0_thr_dbg
       env:
         - CLEANTEST=true
+        - POISON_ENV=true
         - BREWVER=5.10.0
         - BREWOPTS="-DDEBUGGING -Duseithreads"
 
@@ -141,10 +143,10 @@ matrix:
     - perl: 5.12.3_thr
       env:
         - CLEANTEST=true
+        - POISON_ENV=true
         - DBIC_TRACE=1
         - DBIC_MULTICREATE_DEBUG=1
         - DBIC_STORAGE_RETRY_DEBUG=1
-        - POISON_ENV=true
         - DBIC_TRACE_PROFILE=console
         - BREWVER=5.12.3
         - BREWOPTS="-Duseithreads"
@@ -152,38 +154,45 @@ matrix:
     - perl: 5.16.3_thr_mb
       env:
         - CLEANTEST=false
-        - DBIC_TRACE=1
         - POISON_ENV=true
+        - DBIC_TRACE=1
         - BREWVER=5.16.3
         - BREWOPTS="-Duseithreads -Dusemorebits"
 
     - perl: 5.18-extras
       env:
         - CLEANTEST=false
-        - DBIC_TRACE=1
         - POISON_ENV=true
+        - DBIC_TRACE=1
         - DBIC_TRACE_PROFILE=console_monochrome
         - DBICTEST_VIA_REPLICATED=0
 
     ###
     # Start of the allow_failures block
 
-    # threaded oldest possible with blead CPAN with non-tracing poisoning
+    # threaded oldest possible with blead CPAN
     - perl: devcpan_5.8.1_thr_mb
       env:
         - CLEANTEST=true
         - DEVREL_DEPS=true
-        - POISON_ENV=true
         - BREWVER=5.8.1
         - BREWOPTS="-Duseithreads -Dusemorebits"
 
-    # 5.8.4 threaded with blead CPAN with non-tracing poisoning
-    - perl: devcpan_5.8.4_thr
+    # oldest possible with blead CPAN with poisoning
+    - perl: devcpan_5.8.1
       env:
         - CLEANTEST=true
         - DEVREL_DEPS=true
         - POISON_ENV=true
-        - BREWVER=5.8.4
+        - BREWVER=5.8.1
+
+    # 5.8.7 threaded with blead CPAN with non-tracing poisoning
+    - perl: devcpan_5.8.7_thr
+      env:
+        - CLEANTEST=true
+        - DEVREL_DEPS=true
+        - POISON_ENV=true
+        - BREWVER=5.8.7
         - BREWOPTS="-Duseithreads"
 
     # 5.10.0 threaded with blead CPAN
@@ -209,12 +218,11 @@ matrix:
         - POISON_ENV=true
         - BREWVER=blead
 
-    # bleadperl with blead CPAN with non-tracing poisoning
+    # bleadperl with blead CPAN
     - perl: devcpan_bleadperl_thr_mb
       env:
         - CLEANTEST=false
         - DEVREL_DEPS=true
-        - POISON_ENV=true
         - BREWVER=blead
         - BREWOPTS="-Duseithreads -Dusemorebits"
 
@@ -224,7 +232,8 @@ matrix:
 
     # these run with various dev snapshots - allowed to fail
     - perl: devcpan_5.8.1_thr_mb
-    - perl: devcpan_5.8.4_thr
+    - perl: devcpan_5.8.1
+    - perl: devcpan_5.8.7_thr
     - perl: devcpan_5.10.0_thr_mb
     - perl: devcpan_5.12.1_thr
     - perl: bleadperl
diff --git a/Changes b/Changes
index 43740e2..153c3a8 100644 (file)
--- a/Changes
+++ b/Changes
@@ -10,6 +10,7 @@ Revision history for DBIx::Class
           notably on_connect* failures now properly abort the entire connect
         - Fix corner case of stringify-only overloaded objects being used in
           create()/populate()
+        - Fix t/52leaks.t failures on compilerless systems (RT#104429)
 
     * Misc
         - Skip tests in a way more intelligent and speedy manner when optional
index 9269644..a2b96cc 100755 (executable)
@@ -33,6 +33,21 @@ if [[ "$POISON_ENV" = "true" ]] ; then
     parallel_installdeps_notest DBD::SQLite@1.29
   fi
 
+  # also try minimal tested installs *without* a compiler
+  if [[ "$CLEANTEST" = "true" ]]; then
+
+    # Clone and P::S::XS are both bugs
+    # File::Spec can go away as soon as I dump Path::Class
+    # List::Util can be excised after that as well (need to make my own max() routine for older perls)
+
+    installdeps Sub::Name Clone Package::Stash::XS \
+                $( perl -MFile::Spec\ 3.26 -e1 &>/dev/null || echo "File::Spec" ) \
+                $( perl -MList::Util\ 1.16 -e1 &>/dev/null || echo "List::Util" )
+
+    mkdir -p "$HOME/bin" # this is already in $PATH, just doesn't exist
+    run_or_err "Linking ~/bin/cc to /bin/false - thus essentially BREAKING the C compiler" \
+               "ln -s /bin/false $HOME/bin/cc"
+  fi
 fi
 
 if [[ "$CLEANTEST" = "true" ]]; then
index ece1a45..2af797c 100644 (file)
@@ -446,6 +446,14 @@ for my $addr (keys %$weak_registry) {
     delete $weak_registry->{$addr}
       unless $cleared->{hash_merge_singleton}{$weak_registry->{$addr}{weakref}{behavior}}++;
   }
+  elsif ($names =~ /^B::Hooks::EndOfScope::PP::_TieHintHashFieldHash/m) {
+    # there is one tied lexical which stays alive until GC time
+    # https://metacpan.org/source/ETHER/B-Hooks-EndOfScope-0.15/lib/B/Hooks/EndOfScope/PP/FieldHash.pm#L24
+    # simply ignore it here, instead of teaching the leaktracer to examine ties
+    # the latter is possible yet terrible: https://github.com/dbsrgits/dbix-class/blob/v0.082820/t/lib/DBICTest/Util/LeakTracer.pm#L113-L117
+    delete $weak_registry->{$addr}
+      unless $cleared->{bheos_pptiehinthashfieldhash}++;
+  }
   elsif ($names =~ /^DateTime::TimeZone::UTC/m) {
     # DT is going through a refactor it seems - let it leak zones for now
     delete $weak_registry->{$addr};