File tree Expand file tree Collapse file tree 8 files changed +69
-14
lines changed
Expand file tree Collapse file tree 8 files changed +69
-14
lines changed Original file line number Diff line number Diff line change 2121 - LD_LIBRARY_PATH="$TRAVIS_BUILD_DIR/build/lib":$LD_LIBRARY_PATH
2222 - LIBRARY_PATH="$TRAVIS_BUILD_DIR/build/lib":$LIBRARY_PATH
2323 - C_INCLUDE_PATH="$TRAVIS_BUILD_DIR/build/include"
24+ - CFLAGS="-g3 -O0 -Wall -fvisibility=hidden"
25+ - ZEND_DONT_UNLOAD_MODULES=1
26+ - USE_ZEND_ALLOC=0
2427 matrix :
25- - CC="ccache gcc" CFLAGS="-g3 -O0 -fno-delete-null-pointer-checks -Wall -std=gnu90 -fvisibility=hidden"
26- - CC="ccache clang" CFLAGS="-g3 -O0 -fcolor-diagnostics -Wall -std=gnu90"
28+ - CC="ccache gcc"
29+ - CC="ccache clang"
2730
2831matrix :
2932 fast_finish : true
3033 allow_failures :
3134 - php : nightly
3235 include :
33- - env : CC="ccache gcc" CFLAGS="-g3 -O0 -fno-delete-null-pointer-checks -Wall -std=gnu90 -fvisibility=hidden"
36+ - env : CC="ccache gcc"
3437 php : nightly
3538 compiler : gcc
36- - env : CC="ccache clang" CFLAGS="-g3 -O0 -fcolor-diagnostics -Wall -std=gnu90"
39+ - env : CC="ccache clang"
3740 php : nightly
3841 compiler : clang
3942
@@ -47,15 +50,15 @@ cache:
4750 - $HOME/.composer/cache
4851
4952install :
50- - bash ./tests/ci/install-travis
53+ - bash ./unit- tests/ci/install-travis
5154 - composer --prefer-source install
5255
5356before_install :
5457 - if [[ ! -z "${GH_TOKEN}" ]]; then composer config github-oauth.github.com ${GH_TOKEN}; echo "Configured Github token"; fi;
5558
5659script :
5760 - php --ri "Zephir Parser"
58- - valgrind --read-var-info=yes --error-exitcode=1 --fullpath-after= --track-origins=yes --leak-check=full ./vendor/bin/ phpunit -c phpunit.xml.dist --debug tests/
61+ - valgrind --read-var-info=yes --error-exitcode=1 --fullpath-after= --track-origins=yes --leak-check=full --num-callers=20 $(phpenv which php) ./unit-tests/ phpunit -c phpunit.xml.dist --debug unit- tests/
5962
6063notifications :
6164 email :
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 2020// turn on all errors
2121error_reporting (-1 );
2222
23- $ vendorPath = dirname (dirname (__FILE__ )) . '/vendor ' ;
23+ ini_set ('display_errors ' , 1 );
24+ ini_set ('display_startup_errors ' , 1 );
25+
26+ setlocale (LC_ALL , 'en_US.utf-8 ' );
2427
25- if (! is_file ( $ vendorPath . ' /autoload.php ' )) {
26- throw new \ RuntimeException (
27- ' Unable to locate autoloader. Run `composer install` from the project root directory. '
28- );
28+ set_time_limit (- 1 );
29+
30+ if (! ini_get ( ' date.timezone ' )) {
31+ ini_set ( ' date.timezone ' , ' UTC ' );
2932}
3033
31- require $ vendorPath . '/autoload.php ' ;
34+ clearstatcache ();
35+
36+ $ vendorPath = dirname (dirname (__FILE__ )) . '/vendor ' ;
37+
38+ if (file_exists ($ vendorPath . '/autoload.php ' )) {
39+ require $ vendorPath . '/autoload.php ' ;
40+ }
3241
33- define ('ZEPHIR_DATA ' , __DIR__ . DIRECTORY_SEPARATOR . 'Data ' . DIRECTORY_SEPARATOR );
34- define ('OUTPUT_DATA ' , __DIR__ . DIRECTORY_SEPARATOR . 'Output ' . DIRECTORY_SEPARATOR );
42+ define ('TESTS_ROOT ' , __DIR__ );
43+ define ('ZEPHIR_DATA ' , __DIR__ . DIRECTORY_SEPARATOR . 'Data ' );
44+ define ('OUTPUT_DATA ' , __DIR__ . DIRECTORY_SEPARATOR . 'Output ' );
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env php
2+ <?php
3+
4+ /*
5+ +--------------------------------------------------------------------------+
6+ | Zephir Parser. |
7+ +--------------------------------------------------------------------------+
8+ | Copyright (c) 2013-2017 Zephir Team and contributors |
9+ +--------------------------------------------------------------------------+
10+ | This source file is subject the MIT license, that is bundled with |
11+ | this package in the file LICENSE, and is available through the |
12+ | world-wide-web at the following url: |
13+ | http://zephir-lang.com/license.html |
14+ | |
15+ | If you did not receive a copy of the MIT license and are unable |
16+ | to obtain it through the world-wide-web, please send a note to |
17+ | license@zephir-lang.com so we can mail you a copy immediately. |
18+ +--------------------------------------------------------------------------+
19+ */
20+
21+ require __DIR__ . DIRECTORY_SEPARATOR . 'bootstrap.php ' ;
22+
23+ $ exit = true ;
24+ if ($ index = array_search ('--not-exit ' , $ _SERVER ['argv ' ])) {
25+ $ exit = false ;
26+ unset($ _SERVER ['argv ' ][$ index ]);
27+ }
28+
29+ if (!class_exists ('PHPUnit_TextUI_Command ' )) {
30+ fwrite (STDERR ,
31+ 'You need to set up the project dependencies using Composer: ' . PHP_EOL . PHP_EOL .
32+ ' composer install ' . PHP_EOL . PHP_EOL .
33+ 'You can learn all about Composer on https://getcomposer.org/. ' . PHP_EOL
34+ );
35+
36+ die (1 );
37+ }
38+
39+ $ res = PHPUnit_TextUI_Command::main ($ exit );
40+ if ($ res ) {
41+ exit ($ res );
42+ }
You can’t perform that action at this time.
0 commit comments