source: git/run-xcachetest @ 22aaf97

1.3
Last change on this file since 22aaf97 was 22aaf97, checked in by Xuefer <xuefer@…>, 10 years ago

merged r585:592 from trunk

git-svn-id: svn://svn.lighttpd.net/xcache/branches/1.3@627 c26eb9a1-5813-0410-bd6c-c2e55f420ca7

  • Property mode set to 100755
File size: 827 bytes
Line 
1#!/bin/sh
2
3getAbsolutePath() {
4    which readlink >/dev/null 2>&1 && readlink -f "$@" || echo "$@"
5}
6
7# use symlink first
8if test -x ./php-cli ; then
9    php_cli=`getAbsolutePath ./php-cli`
10elif test ! -z "$TEST_PHP_EXECUTABLE" && test -x "$TEST_PHP_EXECUTABLE"; then
11    php_cli="$TEST_PHP_EXECUTABLE"
12else
13    php_cli="`which php`"
14fi
15
16if test -x ./php-cgi ; then
17    php_cgi=`getAbsolutePath ./php-cgi`
18else
19    php_cgi="`which php-cgi`"
20fi
21
22test -z "$PHP_SRC" && PHP_SRC=`getAbsolutePath ./php-src`
23
24TEST_PHP_EXECUTABLE="$php_cli"
25TEST_PHP_CGI_EXECUTABLE="$php_cgi"
26TEST_PHP_SRCDIR="$PHP_SRC"
27
28export TEST_PHP_EXECUTABLE
29export TEST_PHP_CGI_EXECUTABLE
30export TEST_PHP_SRCDIR
31
32echo "XCache test running with:"
33echo "TEST_PHP_CGI_EXECUTABLE: $TEST_PHP_CGI_EXECUTABLE"
34echo "TEST_PHP_EXECUTABLE:     $TEST_PHP_EXECUTABLE"
35
36exec "$php_cli" "$@"
Note: See TracBrowser for help on using the repository browser.