Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Desportes <williamdes@wdes.fr>2020-05-25 02:50:18 +0300
committerWilliam Desportes <williamdes@wdes.fr>2020-06-10 02:27:22 +0300
commit3482a246701099fb4310668eaf5afaf235ca5b3b (patch)
tree00e358f5696bcd4baaafba93404fa57838dd9a19 /test/start-local-server
parent4de5bcb2a7d65ee9e12d14b50b4750dbec40634f (diff)
Allow local usage of ./test/start-local-server
Signed-off-by: William Desportes <williamdes@wdes.fr>
Diffstat (limited to 'test/start-local-server')
-rwxr-xr-xtest/start-local-server16
1 files changed, 12 insertions, 4 deletions
diff --git a/test/start-local-server b/test/start-local-server
index 6a09c29d3a..0bb19244fb 100755
--- a/test/start-local-server
+++ b/test/start-local-server
@@ -15,18 +15,26 @@ if [ "$CI_MODE" != "selenium" ] ; then
fi
# Start php-fpm + nginx in temporary dir
-DIR=`mktemp -d`
+DIR=`mktemp -d --suffix=-phpMyAdminTest`
CURRENT=`pwd`
-PHP_VERSION=$(phpenv version-name)
# Create configuration with correct paths
cp test/nginx.conf test/php-fpm.conf test/php.ini $DIR/
sed -i -e "s,%DIR%,$DIR," -e "s,%ROOT%,$CURRENT," $DIR/*
mkdir $DIR/sessions
+echo "Using temporary dir: ${DIR}"
+
+# You can define FPM_PATH to override the path for example FPM_PATH="php-fpm7.4"
+FPM_PATH="${FPM_PATH:-php-fpm}"
+if [ ! -z "${TRAVIS}" ]; then
+ PHP_VERSION=$(phpenv version-name)
+ FPM_PATH="$HOME/.phpenv/versions/$PHP_VERSION/sbin/php-fpm"
+fi
+
# Start servers
-$HOME/.phpenv/versions/$PHP_VERSION/sbin/php-fpm --fpm-config $DIR/php-fpm.conf -c $DIR/php.ini
-nginx -c $DIR/nginx.conf
+"$FPM_PATH" --fpm-config $DIR/php-fpm.conf -c $DIR/php.ini
+${NGINX_PATH:-nginx} -c $DIR/nginx.conf
if [ ! -z "$TESTSUITE_BROWSERSTACK_KEY" ] ; then
echo "Using: BrowserStack"