diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-18 23:35:35 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-18 23:35:35 +0100 |
commit | 778561e1739a4a7ef20e85b713b4790e6be225d3 (patch) | |
tree | d1ff42f6b6f8d6aa68f88319506aba91394aded0 /tests/prepare.sh | |
parent | bfaed88493de0a3ebd7f2619cb11291cd09252b1 (diff) | |
parent | da5521c2c168edc48e7d2b5dd12305c9dec85b7b (diff) |
Merge pull request #44 from valmat/unit-test
Unit tests
Diffstat (limited to 'tests/prepare.sh')
-rwxr-xr-x | tests/prepare.sh | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/tests/prepare.sh b/tests/prepare.sh new file mode 100755 index 0000000..58fc646 --- /dev/null +++ b/tests/prepare.sh @@ -0,0 +1,49 @@ +#!/bin/bash +# +# do not run this script. +# Create a local copy of the directory with the extension for run without installation +# + + +EXTDLOC=ext_dir +SO=extfortest.so + +if [ $1 ] +then + SO=$1 +fi + +EXTDIR=$(php-config --extension-dir) + +#echo $EXTDIR + +mkdir -p "./$EXTDLOC" +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 + if [ ! -L $NF ]; + then + if [ -L $LIBFILE ]; + then + #echo "cp $LIBFILE $NF" + cp --no-dereference $LIBFILE $NF + else + ln -s $LIBFILE $NF + fi + else + : + fi; +done + +# current extention +if [ ! -L "$PWD/$EXTDLOC/$SO" ]; +then + ln -s "$PWD/cpp/$SO" "$PWD/$EXTDLOC/$SO" +fi + + + |