Skip to content

Commit

Permalink
Generating core dump to screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Phalcon committed Jun 14, 2012
1 parent 8525083 commit 58d3d22
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ before_script:
- cd ..
- mysql -uroot -e 'create database phalcon_test charset=utf8 collate=utf8_unicode_ci;'
- mysql -uroot phalcon_test < unit-tests/schemas/mysql/phalcon_test.sql
- ulimit -c unlimited
- chmod +x unit-tests/ci/run_script.sh

script: ./unit-tests/ci/run_script.sh
Expand Down
3 changes: 3 additions & 0 deletions unit-tests/ci/gdb-commands
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bt full
stop
quit
8 changes: 7 additions & 1 deletion unit-tests/ci/run_script.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
ulimit -c unlimited
echo "/tmp/core" > /proc/sys/kernel/core_pattern
phpunit --debug -c unit-tests/phpunit.xml
STATUS=$?
if [ $STATUS != 0 ]; then
cat core
if [ -f /tmp/core ]; then
gdb -q -batch -x unit-tests/ci/gdb-commands -e php -c /tmp/core
else
echo "No core dump was generated"
fi
fi
exit $STATUS
2 changes: 1 addition & 1 deletion unit-tests/config.db.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
$configMysql->host = '127.0.0.1';
$configMysql->username = 'root';
$configMysql->password = '';
$configMysql->name = 'phalcon_test';
$configMysql->name = 'phalcon_test';

0 comments on commit 58d3d22

Please sign in to comment.