mirror of
https://github.com/danog/jit_bugs.git
synced 2024-11-26 12:04:52 +01:00
Fixes
This commit is contained in:
parent
2c09bdd409
commit
b3fc233d62
@ -42,7 +42,7 @@ RUN true \
|
||||
--libdir=/usr/lib/php --libexecdir=/usr/lib/php --datadir=/usr/share/php/8.2 \
|
||||
--sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man \
|
||||
--enable-debug --enable-address-sanitizer --disable-rpath --disable-static \
|
||||
--enable-filter --with-openssl \
|
||||
--enable-filter --with-openssl --enable-mbstring \
|
||||
--with-password-argon2=/usr --with-external-pcre --with-mhash=/usr --with-libxml \
|
||||
--enable-session --with-sodium --with-zlib=/usr --with-zlib-dir=/usr \
|
||||
--enable-pcntl --with-libedit=shared,/usr \
|
||||
@ -63,3 +63,5 @@ RUN php -r "readfile('https://getcomposer.org/installer');" | php \
|
||||
|
||||
ENV USE_ZEND_ALLOC=0
|
||||
ENV PSALM_ALLOW_XDEBUG=1
|
||||
|
||||
WORKDIR /app
|
@ -1,17 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
cd /tmp
|
||||
|
||||
git clone https://github.com/vimeo/psalm
|
||||
cd psalm
|
||||
git checkout 7428e49b115a2a837aa29cf0fafd0ca902fe2457
|
||||
|
||||
export PSALM_ALLOW_XDEBUG=1
|
||||
|
||||
composer i --ignore-platform-reqs
|
||||
|
||||
echo "About to run phpunit"
|
||||
|
||||
php vendor/bin/phpunit --debug tests/MagicMethodAnnotationTest.php
|
||||
|
||||
echo "OK, no bugs!"
|
@ -1,80 +0,0 @@
|
||||
<?php
|
||||
|
||||
require 'vendor/autoload.php';
|
||||
|
||||
use Infection\Configuration\Entry\Logs;
|
||||
use Infection\Configuration\Entry\PhpUnit;
|
||||
use Infection\Configuration\Entry\Source;
|
||||
use Infection\Configuration\Schema\SchemaConfiguration;
|
||||
use Infection\Configuration\Schema\SchemaConfigurationFactory;
|
||||
use JsonSchema\Validator;
|
||||
|
||||
function test_it_can_create_a_config(
|
||||
string $json,
|
||||
): void {
|
||||
$rawConfig = json_decode($json);
|
||||
|
||||
$validator = new Validator();
|
||||
|
||||
$validator->validate($rawConfig, json_decode('{
|
||||
"$schema": "https://json-schema.org/draft-07/schema#",
|
||||
"properties": {
|
||||
"source": {"type": "string"}
|
||||
}
|
||||
}'));
|
||||
|
||||
$actual = (new SchemaConfigurationFactory())->create(
|
||||
'/path/to/config',
|
||||
$rawConfig
|
||||
);
|
||||
}
|
||||
|
||||
function provideRawConfig(): iterable
|
||||
{
|
||||
|
||||
yield '[timeout] nominal' => [
|
||||
<<<'JSON'
|
||||
{
|
||||
"timeout": 100,
|
||||
"source": {
|
||||
"directories": ["src"]
|
||||
}
|
||||
}
|
||||
JSON
|
||||
,
|
||||
];
|
||||
|
||||
|
||||
yield '[logs][text] nominal' => [
|
||||
<<<'JSON'
|
||||
{
|
||||
"source": {
|
||||
"directories": ["src"]
|
||||
},
|
||||
"logs": {
|
||||
"text": "text.log"
|
||||
}
|
||||
}
|
||||
JSON
|
||||
,
|
||||
];
|
||||
yield '[logs][html] nominal' => [
|
||||
<<<'JSON'
|
||||
{
|
||||
"source": {
|
||||
"directories": ["src"]
|
||||
},
|
||||
"logs": {
|
||||
"html": "report.html"
|
||||
}
|
||||
}
|
||||
JSON
|
||||
,
|
||||
];
|
||||
}
|
||||
|
||||
for ($x = 0; $x < 10000; $x++) {
|
||||
foreach (provideRawConfig() as [$a]) {
|
||||
test_it_can_create_a_config($a);
|
||||
}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
#!/bin/bash -e
|
||||
|
||||
cd /tmp
|
||||
|
||||
git clone https://github.com/infection/infection
|
||||
cd infection
|
||||
git checkout fe7cbe78e5838608df42ec7688d353ef1d631fee
|
||||
|
||||
composer i --ignore-platform-reqs
|
||||
|
||||
echo "About to run the standalone test"
|
||||
|
||||
php /app/2_infection.php
|
||||
|
||||
echo "About to run the testsuite"
|
||||
|
||||
vendor/bin/phpunit
|
||||
|
||||
echo "OK, no bugs!"
|
@ -2,6 +2,8 @@
|
||||
|
||||
cd /tmp
|
||||
|
||||
rm -rf psalm
|
||||
|
||||
git clone https://github.com/nicelocal/psalm -b rector_pass --depth 1
|
||||
cd psalm
|
||||
git checkout 9d3fee47afa90f3eb53043a26f01e587d2dd34e5
|
||||
@ -12,6 +14,12 @@ composer i --ignore-platform-reqs
|
||||
|
||||
echo "About to run psalm"
|
||||
|
||||
./psalm --no-cache
|
||||
docker run -v $PWD:/app --rm --privileged -it asan_tests /usr/bin/php /app/psalm --no-cache
|
||||
|
||||
echo "About to run composer"
|
||||
|
||||
rm -rf vendor
|
||||
|
||||
docker run -v $PWD:/app --rm --privileged -it asan_tests composer update
|
||||
|
||||
echo "OK, no bugs!"
|
Loading…
Reference in New Issue
Block a user