Skip to content

Commit

Permalink
Manually finding the core dump
Browse files Browse the repository at this point in the history
  • Loading branch information
phalcon committed Jun 2, 2013
1 parent 7753e7f commit 4c15bd7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ before_script:
- psql -c 'create database phalcon_test;' -U postgres
- psql -U postgres phalcon_test -q -f unit-tests/schemas/postgresql/phalcon_test.sql
- sqlite3 /tmp/phalcon_test.sqlite < unit-tests/schemas/sqlite/phalcon_test.sql
- echo /tmp/core | sudo tee /proc/sys/kernel/core_pattern
- chmod +x unit-tests/ci/run_script.sh

script: ./unit-tests/ci/run_script.sh
Expand Down
25 changes: 23 additions & 2 deletions unit-tests/ci/run_script.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
#!/bin/bash

# Phalcon Framework
#
# Copyright (c) 2011-2013 Phalcon Team (http://www.phalconphp.com)
#
# This source file is subject to the New BSD License that is bundled
# with this package in the file docs/LICENSE.txt.
#
# If you did not receive a copy of the license and are unable to
# obtain it through the world-wide-web, please send an email
# to license@phalconphp.com so we can send you a copy immediately.
#
# Authors: Andres Gutierrez <andres@phalconphp.com>
# Eduar Carvajal <eduar@phalconphp.com>

find_core_dump(){
find /home/travis -name core
}

ulimit -c unlimited
PHP_VERSION=`php -r "echo PHP_VERSION;"`
Expand All @@ -11,7 +30,8 @@ if [ $STATUS != 0 ]; then
sudo apt-get install gdb
gdb -q -batch -x ./unit-tests/ci/gdb-commands -e $PHP_BIN -c /tmp/core
else
echo "No core dump was generated"
find_core_dump
echo "No core dump was found"
fi

exit $STATUS
Expand All @@ -24,7 +44,8 @@ if [ $STATUS != 0 ]; then
sudo apt-get install gdb
gdb -q -batch -x ./unit-tests/ci/gdb-commands -e $PHP_BIN -c /tmp/core
else
echo "No core dump was generated"
find_core_dump
echo "No core dump was found"
fi
fi

Expand Down

0 comments on commit 4c15bd7

Please sign in to comment.