summaryrefslogtreecommitdiffstats
path: root/bindings
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2010-01-18 13:50:15 +0000
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2010-01-18 13:50:15 +0000
commitfca7999dba11d951cca19c04cce494e44f32b28f (patch)
tree403918f75bfe8a6d59c91dd28008da8a43f5be31 /bindings
parentc719916fcabdfc130c8a9876c9f80e801457b34c (diff)
downloadlasso-fca7999dba11d951cca19c04cce494e44f32b28f.tar.gz
lasso-fca7999dba11d951cca19c04cce494e44f32b28f.tar.xz
lasso-fca7999dba11d951cca19c04cce494e44f32b28f.zip
Bindings PHP5: rewire php5 tests to the makefiles, make them pass distcheck
Diffstat (limited to 'bindings')
-rw-r--r--bindings/php5/Makefile.am2
-rw-r--r--bindings/php5/tests/Makefile.am1
-rwxr-xr-xbindings/php5/tests/binding_tests.php2
-rwxr-xr-xbindings/php5/tests/binding_tests.sh2
-rwxr-xr-xbindings/php5/tests/profile_tests.php2
-rwxr-xr-xbindings/php5/tests/profile_tests.sh2
6 files changed, 6 insertions, 5 deletions
diff --git a/bindings/php5/Makefile.am b/bindings/php5/Makefile.am
index 4ba2965c..9c144242 100644
--- a/bindings/php5/Makefile.am
+++ b/bindings/php5/Makefile.am
@@ -1,6 +1,6 @@
MAINTAINERCLEANFILES = Makefile.in
MOSTLYCLEANFILES = __init__.pyc lang.pyc php_code.pyc wrapper_header.pyc wrapper_top.pyc
-SUBDIRS = examples
+SUBDIRS = examples tests
INCLUDES = \
-I$(top_builddir) \
diff --git a/bindings/php5/tests/Makefile.am b/bindings/php5/tests/Makefile.am
index 9b2a353d..b2d8549e 100644
--- a/bindings/php5/tests/Makefile.am
+++ b/bindings/php5/tests/Makefile.am
@@ -1,5 +1,6 @@
MAINTAINERCLEANFILES = Makefile.in
if PHP5_ENABLED
+TESTS_ENVIRONMENT=env "SRCDIR=$(srcdir)/"
TESTS = profile_tests.sh binding_tests.sh
endif
diff --git a/bindings/php5/tests/binding_tests.php b/bindings/php5/tests/binding_tests.php
index 4c9fb962..e7b89abf 100755
--- a/bindings/php5/tests/binding_tests.php
+++ b/bindings/php5/tests/binding_tests.php
@@ -23,7 +23,7 @@
require("../lasso.php");
-define("DATA_DIR", "../../../tests/data/");
+define("DATA_DIR", getenv("SRCDIR") . "../../../tests/data/");
function test01() {
echo "Get an xmlNode* from a Lasso function... ";
diff --git a/bindings/php5/tests/binding_tests.sh b/bindings/php5/tests/binding_tests.sh
index 9f3e9e17..3bfad5d6 100755
--- a/bindings/php5/tests/binding_tests.sh
+++ b/bindings/php5/tests/binding_tests.sh
@@ -1,3 +1,3 @@
#!/bin/sh
-php5 -n -d extension_dir=../.libs binding_tests.php
+php5 -n -d extension_dir=../.libs -d extension=lasso.so ${SRCDIR}binding_tests.php
diff --git a/bindings/php5/tests/profile_tests.php b/bindings/php5/tests/profile_tests.php
index 50264330..58414213 100755
--- a/bindings/php5/tests/profile_tests.php
+++ b/bindings/php5/tests/profile_tests.php
@@ -23,7 +23,7 @@
require("../lasso.php");
-define("DATA_DIR", "../../../tests/data/");
+define(DATA_DIR, getenv('SRCDIR') . '../../../tests/data/');
function test01() {
echo "Server construction, dump & newFromDump... ";
diff --git a/bindings/php5/tests/profile_tests.sh b/bindings/php5/tests/profile_tests.sh
index 446131df..08a53fac 100755
--- a/bindings/php5/tests/profile_tests.sh
+++ b/bindings/php5/tests/profile_tests.sh
@@ -1,3 +1,3 @@
#!/bin/sh
-php5 -n -d extension_dir=../.libs profile_tests.php
+php5 -n -d extension_dir=../.libs -d extension=lasso.so ${SRCDIR}profile_tests.php