Remove Message::display method
[phpmyadmin.git] / test / start-local-server
blob0bb19244fb4dd4dd9e2c8d47a510da319a717301
1 #!/bin/sh
3 # Do not run as CGI
4 if [ -n "$GATEWAY_INTERFACE" ] ; then
5 echo 'Can not invoke as CGI!'
6 exit 1
7 fi
9 set -e
10 set -x
12 if [ "$CI_MODE" != "selenium" ] ; then
13 echo "Not in CI_MODE=selenium"
14 exit 0
17 # Start php-fpm + nginx in temporary dir
18 DIR=`mktemp -d --suffix=-phpMyAdminTest`
19 CURRENT=`pwd`
21 # Create configuration with correct paths
22 cp test/nginx.conf test/php-fpm.conf test/php.ini $DIR/
23 sed -i -e "s,%DIR%,$DIR," -e "s,%ROOT%,$CURRENT," $DIR/*
24 mkdir $DIR/sessions
26 echo "Using temporary dir: ${DIR}"
28 # You can define FPM_PATH to override the path for example FPM_PATH="php-fpm7.4"
29 FPM_PATH="${FPM_PATH:-php-fpm}"
30 if [ ! -z "${TRAVIS}" ]; then
31 PHP_VERSION=$(phpenv version-name)
32 FPM_PATH="$HOME/.phpenv/versions/$PHP_VERSION/sbin/php-fpm"
35 # Start servers
36 "$FPM_PATH" --fpm-config $DIR/php-fpm.conf -c $DIR/php.ini
37 ${NGINX_PATH:-nginx} -c $DIR/nginx.conf
39 if [ ! -z "$TESTSUITE_BROWSERSTACK_KEY" ] ; then
40 echo "Using: BrowserStack"
41 # Install if necessary
42 if [ ! -f ~/browserstack/BrowserStackLocal ] ; then
43 mkdir -p ~/browserstack
44 cd ~/browserstack
45 wget https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip
46 unzip BrowserStackLocal-linux-x64.zip
48 # Start BrowserStack Local forwarder
49 ~/browserstack/BrowserStackLocal --force-local --localIdentifier "travis-$TRAVIS_JOB_NUMBER" --onlyAutomate --key "$TESTSUITE_BROWSERSTACK_KEY" --daemon start
50 elif [ -z "$SKIP_STANDALONE" ] ; then
51 echo "Using: selenium-standalone"
52 if [ ! -f selenium-standalone ]; then
53 yarn global add selenium-standalone
54 selenium-standalone install
56 selenium-standalone start -- -debug > ~/selenium-standalone.logs~ 2>&1 &
57 echo $! > ~/selenium-standalone.pid~
58 else
59 echo "Using: nothing."