mirror of
https://github.com/danog/jit_bugs.git
synced 2024-11-26 12:04:52 +01:00
50 lines
1018 B
Bash
Executable File
50 lines
1018 B
Bash
Executable File
#!/bin/bash -e
|
|
|
|
composer update
|
|
|
|
wrap=$PWD/bugs/wrap.php
|
|
standalone=$PWD/bugs/infection.php
|
|
refactor=$PWD/refactor.php
|
|
|
|
cd /tmp
|
|
|
|
rm -rf infection
|
|
|
|
git clone https://github.com/infection/infection -b 0.27.4
|
|
cd infection
|
|
|
|
composer i --ignore-platform-reqs
|
|
|
|
php $refactor
|
|
|
|
cp $standalone .
|
|
cp $wrap .
|
|
|
|
echo "About to run the standalone test"
|
|
|
|
EXIT_CODE=0
|
|
docker run -v $PWD:/app --rm --privileged -it asan_tests /usr/bin/php /app/wrap.php /app/infection.php || EXIT_CODE=$?
|
|
|
|
if [ $EXIT_CODE -ne 0 ]; then
|
|
echo "Failed, exit code $EXIT_CODE"
|
|
exit $EXIT_CODE
|
|
fi
|
|
|
|
echo "About to run the testsuite"
|
|
|
|
EXIT_CODE=0
|
|
docker run -v $PWD:/app --rm --privileged -it asan_tests /usr/bin/php --repeat 2 -f /app/wrap.php vendor/bin/phpunit || EXIT_CODE=$?
|
|
|
|
if [ $EXIT_CODE -gt 128 ]; then
|
|
echo "Failed, exit code $EXIT_CODE"
|
|
exit $EXIT_CODE
|
|
fi
|
|
|
|
echo "About to run composer"
|
|
|
|
rm -rf vendor
|
|
|
|
docker run -v $PWD:/app --rm --privileged -it asan_tests /usr/bin/php /app/wrap.php /usr/bin/composer update
|
|
|
|
echo "OK, no bugs!"
|