ソースを参照

Travis CI: try to get core files of crashed unit tests

For unknown reasons the unit test on the Travis MacOS container environment causes crashes.
See https://github.com/civetweb/civetweb/issues/1048
Today I found an article how core dump debugging on Travis CI might work:
http://jsteemann.github.io/blog/2014/10/30/getting-core-dumps-of-failed-travisci-builds/
This is a test if the crash on Travis Mac OS containers can be analyzed this way.
bel2125 3 年 前
コミット
3f5e14b7b5
1 ファイル変更7 行追加0 行削除
  1. 7 0
      .travis.yml

+ 7 - 0
.travis.yml

@@ -17,6 +17,7 @@ addons:
       - cmake
       - openssl
       - libssl-dev
+      - gdb
     sources:
       - kubuntu-backports
 
@@ -120,6 +121,12 @@ before_script:
     ${ADDITIONAL_CMAKE_ARGS}
     ..
   - ls -la
+  - ulimit -c unlimited -S
+
+after_failure:
+  - COREFILE=$(find . -maxdepth 1 -name "core*" | head -n 1) # find core file
+  - if [[ -f "$COREFILE" ]]; then gdb -c "$COREFILE" example -ex "thread apply all bt" -ex "set pagination 0" -batch; fi
+
 
 # Modifications due to Travis IPv6 issues:
 # https://github.com/travis-ci/travis-ci/issues/8711