update helper scripts and more

This commit is contained in:
Dengke Tang
2023-02-24 15:39:09 -08:00
parent 4d5420dffc
commit cdef4b7ef1
11 changed files with 262 additions and 256 deletions
+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
set -ex
BASENAME=${0}
TOOLS_DIR=$(dirname ${BASENAME})
WORK_DIR="${TOOLS_DIR}/.."
cd "${WORK_DIR}"
launcher=
if command -v catchsegv; then
launcher=catchsegv
fi
if [ -z $PHP_BINARY ]; then
PHP_BINARY=$(which php)
fi
if [ ! -d vendor ]; then
COMPOSER_BINARY=$(which composer)
$PHP_BINARY -c php.ini $COMPOSER_BINARY update
fi
$launcher $PHP_BINARY -c php.ini vendor/bin/phpunit tests --debug