From: Peter Rabbitson <ribasushi@cpan.org>
Date: Fri, 8 Jan 2016 18:19:38 +0000 (+0100)
Subject: (travis) Instead of polluting the log on failure, just be loud on OOM alone
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8a684aeaa7dd3c6bd8c7e9a1ff7e8f5704c67a6d;p=dbsrgits%2FDBIx-Class-Historic.git

(travis) Instead of polluting the log on failure, just be loud on OOM alone

Printing the entire VM state has not been useful for the 2 years it's been in
place, so just retire it altogether
---

diff --git a/.travis.yml b/.travis.yml
index fc6de77..6fabbd0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -369,7 +369,7 @@ before_script:
   # need to invoke the after_failure script manually
   # because 'after_failure' runs only after 'script' fails
   #
-  - maint/getstatus maint/travis-ci_scripts/30_before_script.bash || ( maint/travis-ci_scripts/50_after_failure.bash && /bin/false )
+  - maint/getstatus maint/travis-ci_scripts/30_before_script.bash
 
 script:
   # Run actual tests
diff --git a/maint/travis-ci_scripts/50_after_failure.bash b/maint/travis-ci_scripts/50_after_failure.bash
index b155fab..ba92421 100755
--- a/maint/travis-ci_scripts/50_after_failure.bash
+++ b/maint/travis-ci_scripts/50_after_failure.bash
@@ -5,7 +5,7 @@ source maint/travis-ci_scripts/common.bash
 
 if [[ -n "$SHORT_CIRCUIT_SMOKE" ]] ; then exit 0 ; fi
 
-echo_err "
-$(ci_vm_state_text)
-
-$( [[ "$(dmesg)" =~ $( echo "\\bOOM\\b" ) ]] && echo "=== dmesg ringbuffer" && dmesg )"
+if [[ "$(dmesg)" =~ $( echo "\\bOOM\\b" ) ]] ; then
+  echo_err "=== dmesg ringbuffer"
+  echo_err "$(dmesg)"
+fi
diff --git a/maint/travis-ci_scripts/60_after_script.bash b/maint/travis-ci_scripts/60_after_script.bash
index fb5b5fb..102291d 100755
--- a/maint/travis-ci_scripts/60_after_script.bash
+++ b/maint/travis-ci_scripts/60_after_script.bash
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 # !!! Nothing here will be executed !!!
-# The source-line calling this script is commented out in .travis.yml
+# The line calling this script is commented out in .travis.yml
 
 # this file is executed in a subshell - set up the common stuff
 source maint/travis-ci_scripts/common.bash
diff --git a/maint/travis-ci_scripts/common.bash b/maint/travis-ci_scripts/common.bash
index 6dfe36d..f73adde 100755
--- a/maint/travis-ci_scripts/common.bash
+++ b/maint/travis-ci_scripts/common.bash
@@ -75,6 +75,10 @@ run_or_err() {
       echo_err "$LASTCMD"
       echo_err "STDOUT+STDERR:"
       echo_err "$LASTOUT"
+      if [[ "$(dmesg)" =~ $( echo "\\bOOM\\b" ) ]] ; then
+        echo_err "=== dmesg ringbuffer"
+        echo_err "$(dmesg)"
+      fi
     fi
 
     return $LASTEXIT