Permalink
Browse files

Merge branch 'parallel-test-fixes'

  • Loading branch information...
derickr committed Feb 11, 2019
2 parents 01af9ba + b9504e8 commit 606f0d9b59065e6b92a204a29804369f6b34da4b

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,43 @@
#!/bin/bash

PATTERN=${1:-'7.3*'}

PHP_DIR=${PHP_DIR:-/usr/local/php}
SYSTEM_CORES=`nproc`
NPROC=${NPROC:-$SYSTEM_CORES}

PHPS=`ls -vd ${PHP_DIR}/${PATTERN}`

mkdir -p /tmp/ptester
rm -rf /tmp/ptester/group*.lst
mkdir -p /tmp/ptester/logs
rm -rf /tmp/ptester/logs/*
mkdir -p /tmp/ptester/junit
rm -rf /tmp/ptester/junit/*

c=0
for i in $PHPS; do
v=`echo $i | sed 's@.*/@@'`

GroupName=`printf group%03d.lst $c`

echo -n "$v " >> /tmp/ptester/${GroupName}

c=`expr $c + 1`
if [[ $c -eq $NPROC ]]; then
c=0
fi
done

MAX=`expr $NPROC - 1`
for i in `seq 0 $MAX`; do
GroupName=`printf group%03d.lst $i`

if [ -s /tmp/ptester/$GroupName ]; then
./test-thread.sh $i `cat /tmp/ptester/$GroupName` &
fi
done

wait

echo "DONE"
@@ -0,0 +1,23 @@
#!/bin/bash

TID="$1"
shift

rm -rf /tmp/ptester/thread/${TID}
mkdir -p /tmp/ptester/thread/${TID}
CWD=`pwd`

cp run-xdebug-tests.php /tmp/ptester/thread/${TID}

cd /tmp/ptester/thread/${TID}

for i in $@; do
echo $TID $BASHPID "Testing for $i"
PATH=/usr/local/php/$i/bin:$PATH

mkdir -p /tmp/ptester/thread/${TID}/$i
cp -r ${CWD}/contrib /tmp/ptester/thread/${TID}/$i
cp -r ${CWD}/tests /tmp/ptester/thread/${TID}/$i

SKIP_DBGP_TESTS=1 SKIP_UNPARALLEL_TESTS=1 TEST_PHP_EXECUTABLE=`which php` TEST_PHP_JUNIT="/tmp/ptester/junit/$i.xml" php run-xdebug-tests.php /tmp/ptester/thread/${TID}/${i}/tests >/tmp/ptester/logs/$i.log 2>&1
done
@@ -15,7 +15,7 @@ xdebug.trace_format=0
require 'bug00002.inc';
$action = 'do_stuff';
$tf = xdebug_start_trace(sys_get_temp_dir() . '/bug00002.trace');
$tf = xdebug_start_trace(sys_get_temp_dir() . '/' . uniqid('', true) . 'bug00002.trace');
$action();
xdebug_stop_trace();
readfile($tf);
@@ -13,7 +13,7 @@ xdebug.trace_format=0
date.timezone=Europe/Oslo
--FILE--
<?php
$tf = xdebug_start_trace(sys_get_temp_dir() . '/bug00003-' . uniqid() . '.trace');
$tf = xdebug_start_trace(sys_get_temp_dir() . '/bug00003-' . uniqid('', true) . '.trace');
strftime('%b %l %Y %H:%M:%S', 1061728888);
xdebug_stop_trace();
readfile($tf);
@@ -1,5 +1,7 @@
--TEST--
Test for bug #702: Check whether variables tracing also works with =&
Test for bug #702: Check whether variables tracing also works with =& (PHP >= 7.1.1)
--SKIPIF--
<?php if (!version_compare(phpversion(), "7.1.1", '>=')) echo "skip >= PHP 7.1.1 needed\n"; ?>
--INI--
xdebug.default_enable=1
xdebug.profiler_enable=0
@@ -1,5 +1,7 @@
--TEST--
Test for bug #702: Check whether variables tracing also works with =& (with object)
Test for bug #702: Check whether variables tracing also works with =& (with object) (PHP >= 7.1.1)
--SKIPIF--
<?php if (!version_compare(phpversion(), "7.1.1", '>=')) echo "skip >= PHP 7.1.1 needed\n"; ?>
--INI--
xdebug.default_enable=1
xdebug.profiler_enable=0
@@ -1,5 +1,7 @@
--TEST--
Test for bug #1502: SEND_REF lines are not marked as covered.
Test for bug #1502: SEND_REF lines are not marked as covered (PHP >= 7.1.5)
--SKIPIF--
<?php if (!version_compare(phpversion(), "7.1.5", '>=')) echo "skip >= PHP 7.1.5 needed\n"; ?>
--INI--
xdebug.default_enable=1
xdebug.auto_trace=0
@@ -12,12 +12,12 @@ xdebug.show_mem_delta=0
xdebug.trace_format=0
--FILE--
<?php
$tf = xdebug_start_trace(sys_get_temp_dir() . '/bug971' . uniqid(), XDEBUG_TRACE_COMPUTERIZED);
$tf = xdebug_start_trace(sys_get_temp_dir() . '/bug971' . uniqid('', true), XDEBUG_TRACE_COMPUTERIZED);
echo $tf, "\n";
xdebug_stop_trace();
unlink($tf);
$tf = xdebug_start_trace(sys_get_temp_dir() . '/bug971' . uniqid(), XDEBUG_TRACE_COMPUTERIZED | XDEBUG_TRACE_NAKED_FILENAME);
$tf = xdebug_start_trace(sys_get_temp_dir() . '/bug971' . uniqid('', true), XDEBUG_TRACE_COMPUTERIZED | XDEBUG_TRACE_NAKED_FILENAME);
echo $tf, "\n";
xdebug_stop_trace();
unlink($tf);
@@ -337,7 +337,7 @@ static char *xdebug_find_var_name(zend_execute_data *execute_data, const zend_op
xdebug_str_addc(&name, '[');
xdebug_str_add_str(&name, zval_value);
xdebug_str_addc(&name, ']');
xdfree(zval_value);
xdebug_str_free(zval_value);
}
}

@@ -784,6 +784,7 @@ void xdebug_error_cb(int type, const char *error_filename, const uint error_line
}
/* the parser would return 1 (failure), we can bail out nicely */
if (type != E_PARSE) {
efree(buffer);
/* restore memory limit */
zend_set_memory_limit(PG(memory_limit));
zend_objects_store_mark_destructed(&EG(objects_store) TSRMLS_CC);

0 comments on commit 606f0d9

Please sign in to comment.