forked from alice-viola/ThreadPool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
83 lines (75 loc) · 2.16 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
language: cpp
compiler:
- g++
env:
matrix:
- CRASH_PLEASE=boooooooom
- HAPPY_NO_CRASH=all-good
before_install:
# What is the current file size max for core files?
# It is usually 0, which means no core file will be dumped if there is a crash
- ulimit -c
- ulimit -a -S
- ulimit -a -H
install:
- ulimit -c unlimited -S
- ulimit -c
- ulimit -a -S
- ulimit -a -H
- cat /proc/sys/kernel/core_pattern
- sudo apt-get install libcppunit-dev libcppunit-1.13-0 gdb
- ./build.sh
before_script:
- RESULT=0
script:
- ./build/ThreadPoolTest || RESULT=$?
# Run the program to prompt a crash
# Note: we capture the return code of the program here and add
# `|| true` to ensure that travis continues past the crash
- ls -l
- if [[ ${RESULT} == 0 ]]; then echo "\\o/ our test worked without problems"; else echo "ruhroh test returned an errorcode of $RESULT"; fi;
# If the program returned an error code, now we check for a
# core file in the current working directory and dump the backtrace out
- for i in $(find ./ -maxdepth 1 -name 'core*' -print); do gdb $(pwd)/build/ThreadPoolTest core* -ex "thread apply all bt" -ex "set pagination 0" -batch; done;
# now we should present travis with the original
# error code so the run cleanly stops
- if [[ ${RESULT} != 0 ]]; then exit $RESULT ; fi;
# Ubuntu 14.04 Trusty support
sudo: required
dist: trusty
matrix:
include:
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.9
env: COMPILER=g++-4.9
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
env: COMPILER=g++-5
- compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.6
packages:
- clang-3.6
env: COMPILER=clang++-3.6
- compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7
packages:
- clang-3.7
env: COMPILER=clang++-3.7