summaryrefslogtreecommitdiff
path: root/tests/prepare.sh
diff options
context:
space:
mode:
authorvalmat <ufabiz@gmail.com>2014-03-27 01:19:12 +0600
committervalmat <ufabiz@gmail.com>2014-03-27 01:19:12 +0600
commitd0d062b4a05a9eb64b8d2e6d038af96ac532e4b3 (patch)
tree4fc4026b988ca6da18a88d2e34dd1d88c28d24ae /tests/prepare.sh
parent702c95cf779226550af6b33255a8e1b28ccca428 (diff)
Added new tests.
Due to support zts broke the ability to run tests without installation - fixed.
Diffstat (limited to 'tests/prepare.sh')
-rwxr-xr-xtests/prepare.sh22
1 files changed, 12 insertions, 10 deletions
diff --git a/tests/prepare.sh b/tests/prepare.sh
index 58fc646..6c0e331 100755
--- a/tests/prepare.sh
+++ b/tests/prepare.sh
@@ -1,27 +1,31 @@
#!/bin/bash
#
-# do not run this script.
-# Create a local copy of the directory with the extension for run without installation
+# do not run this script manualy.
+# This script is intended to be run from a script test.sh
+# Create a local copy of the directory with the extension for run tests without installation
+#
+# @author valmat <ufabiz@gmail.com>
#
-
+# Local directory in which to copy the links to all installed extensions
EXTDLOC=ext_dir
+mkdir -p "./$EXTDLOC"
+
SO=extfortest.so
+# to check whether specified the extension name as parameter
if [ $1 ]
then
SO=$1
fi
+# a directory of extensions already installed in the operating system
EXTDIR=$(php-config --extension-dir)
-#echo $EXTDIR
-
-mkdir -p "./$EXTDLOC"
+# To copy references for all extensions to the local directory
for LIBFILE in `find $EXTDIR -type f -or -type l -name "*.so"`; do
BN=$(basename $LIBFILE)
- PWD=$(pwd)
NF="$PWD/$EXTDLOC/$BN"
# if still no exist
@@ -29,7 +33,6 @@ for LIBFILE in `find $EXTDIR -type f -or -type l -name "*.so"`; do
then
if [ -L $LIBFILE ];
then
- #echo "cp $LIBFILE $NF"
cp --no-dereference $LIBFILE $NF
else
ln -s $LIBFILE $NF
@@ -40,10 +43,9 @@ for LIBFILE in `find $EXTDIR -type f -or -type l -name "*.so"`; do
done
# current extention
-if [ ! -L "$PWD/$EXTDLOC/$SO" ];
+if [ ! -L "$PWD/$EXTDLOC/$SO" ]
then
ln -s "$PWD/cpp/$SO" "$PWD/$EXTDLOC/$SO"
fi
-