Skip to content

Commit 9015dce

Browse files
author
kkm
committed
Fix redirect from a failing test and dump stack backtrace to the test log.
1 parent a7d9824 commit 9015dce

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎.travis.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ addons:
1111
sources:
1212
- ubuntu-toolchain-r-test
1313
packages:
14+
- gdb
1415
- gcc-4.9
1516
- g++-4.9
1617
- gfortran-4.9
@@ -23,6 +24,7 @@ branches:
2324
- master
2425

2526
before_install:
27+
- cat /proc/sys/kernel/core_pattern
2628
- export XROOT=~/xroot
2729
- tools/extras/travis_install_bindeps.sh $XROOT
2830

‎src/makefiles/default_rules.mk‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,14 @@ test: test_compile
7575
@{ result=0; \
7676
for x in $(TESTFILES); do \
7777
printf "Running $$x ..."; \
78-
./$$x >$$x.testlog 2>1; \
78+
./$$x >$$x.testlog 2>&1; \
7979
if [ $$? -ne 0 ]; then \
8080
echo "... FAIL $$x"; \
8181
result=1; \
82+
if [ -n "$TRAVIS" ] && [ -f core ] && command -v gdb >/dev/null 2>&1; then \
83+
gdb $$x core -ex "thread apply all bt" -batch >>$$x.testlog 2>&1; \
84+
rm -rf core; \
85+
fi; \
8286
else \
8387
echo "... SUCCESS"; \
8488
rm -f $$x.testlog; \

‎tools/extras/travis_script.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ make_kaldi() {
5050
#make_kaldi matrix/test
5151

5252
make_kaldi all -j$MAXPAR
53-
make_kaldi test
53+
make_kaldi test -k

0 commit comments

Comments
 (0)