Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commiteb6c9ee

Browse files
committed
Debug tests
1 parent01d1563 commiteb6c9ee

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed

‎.travis.yml‎

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,18 @@ before_install:
5353
[ -d ~/.composer ] || mkdir ~/.composer
5454
cp .composer/* ~/.composer/
5555
export PHPUNIT=$(readlink -f ./phpunit)
56-
export PHPUNIT_X="$PHPUNIT --exclude-group tty,benchmark,intl-data"
56+
export PHPUNIT_X="$PHPUNIT --stop-on-failure --exclude-group tty,benchmark,intl-data"
5757
export COMPOSER_UP='composer update --no-progress --no-suggest --ansi'
5858
5959
# tfold is a helper to create folded reports
6060
tfold () {
6161
title=$1
6262
fold=$(echo $title | sed -r 's/[^-_A-Za-z\d]+/./g')
6363
shift
64-
echo -e "travis_fold:start:$fold\\n\\e[1;34m$title\\e[0m"
64+
echo -e "travis_fold:start:$fold\\n\\e[1;34m$title\\e[0m$(date)"
6565
bash -xc "$*" 2>&1 &&
66-
echo -e "\\e[32mOK\\e[0m $title\\n\\ntravis_fold:end:$fold" ||
67-
( echo -e "\\e[41mKO\\e[0m $title\\n" && exit 1 )
66+
echo -e "\\e[32mOK $(date)\\e[0m $title\\n\\ntravis_fold:end:$fold" ||
67+
( echo -e "\\e[41mKO $(date)\\e[0m $title\\n" && exit 1 )
6868
}
6969
export -f tfold
7070
@@ -92,12 +92,9 @@ before_install:
9292
fi
9393
9494
# Matrix lines for intermediate PHP versions are skipped for pull requests
95-
if [[ ! $deps && ! $PHP = ${MIN_PHP%.*} && ! $PHP = hhvm* && $TRAVIS_PULL_REQUEST != false ]]; then
96-
deps=skip
97-
skip=1
98-
else
99-
COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n')
100-
fi
95+
# COMPONENTS=$(printf 'src/Symfony/Bridge/Doctrine\nsrc/Symfony/Bundle/FrameworkBundle\nsrc/Symfony/Component/Cache\nsrc/Symfony/Component/HttpFoundation\nsrc/Symfony/Component/Lock\n')
96+
# COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n'|grep Lock)
97+
COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n')
10198
10299
-|
103100
# Install sigchild-enabled PHP to test the Process component on the lowest PHP matrix line
@@ -170,16 +167,16 @@ install:
170167
if [[ $skip ]]; then
171168
echo -e "\\n\\e[1;34mIntermediate PHP version $PHP is skipped for pull requests.\\e[0m"
172169
elif [[ $deps = high ]]; then
173-
echo "$COMPONENTS" | parallel --gnu -j10% "tfold {} 'cd {} && $COMPOSER_UP && $PHPUNIT_X$LEGACY'"
170+
echo "$COMPONENTS" | parallel --gnu -j5% "tfold {} 'cd {} && $COMPOSER_UP && $PHPUNIT_X$LEGACY'"
174171
elif [[ $deps = low ]]; then
175-
echo "$COMPONENTS" | parallel --gnu -j10% "tfold {} 'cd {} && $COMPOSER_UP --prefer-lowest --prefer-stable && $PHPUNIT_X'" &&
172+
echo "$COMPONENTS" | parallel --gnu -j5% "tfold {} 'cd {} && $COMPOSER_UP --prefer-lowest --prefer-stable && $PHPUNIT_X'" &&
176173
# Test the PhpUnit bridge on PHP 5.3, using the original phpunit script
177174
tfold src/Symfony/Bridge/PhpUnit \
178175
"cd src/Symfony/Bridge/PhpUnit && wget https://phar.phpunit.de/phpunit-4.8.phar && phpenv global 5.3 && composer update --no-progress --ansi && php phpunit-4.8.phar"
179176
elif [[ $PHP = hhvm* ]]; then
180177
$PHPUNIT --exclude-group benchmark,intl-data
181178
else
182-
echo "$COMPONENTS" | parallel --gnu "tfold {} $PHPUNIT_X {}"
179+
echo "$COMPONENTS" | parallel --gnu-j5%"tfold {} $PHPUNIT_X {}"
183180
tfold tty-group $PHPUNIT --group tty
184181
if [[ $PHP = ${MIN_PHP%.*} ]]; then
185182
echo -e "1\\n0" | xargs -I{} bash -c "tfold src/Symfony/Component/Process.sigchild{} SYMFONY_DEPRECATIONS_HELPER=weak ENHANCE_SIGCHLD={} php-$MIN_PHP/sapi/cli/php .phpunit/phpunit-4.8/phpunit --colors=always src/Symfony/Component/Process/"

‎src/Symfony/Component/Lock/Tests/Store/AbstractStoreTest.php‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ public function testSave()
3939
$this->assertFalse($store->exists($key));
4040
}
4141

42+
/**
43+
* @dataProvider lotOfData
44+
*/
4245
publicfunctiontestSaveWithDifferentResources()
4346
{
4447
$store =$this->getStore();
@@ -60,6 +63,9 @@ public function testSaveWithDifferentResources()
6063
$this->assertFalse($store->exists($key2));
6164
}
6265

66+
/**
67+
* @dataProvider lotOfData
68+
*/
6369
publicfunctiontestSaveWithDifferentKeysOnSameResources()
6470
{
6571
$store =$this->getStore();
@@ -109,4 +115,9 @@ public function testSaveTwice()
109115

110116
$store->delete($key);
111117
}
118+
119+
publicfunctionlotOfData()
120+
{
121+
returnarray_fill(0,1000, []);
122+
}
112123
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp