Changeset: c1e10b607fca for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c1e10b607fca
Modified Files:
monetdb5/tests/mapi/Tests/perl_dbi.MAL.bat
monetdb5/tests/mapi/Tests/perl_dbi.MAL.sh
sql/test/mapi/Tests/perl_dbi.SQL.bat
sql/test/mapi/Tests/perl_dbi.SQL.sh
sql/test/mapi/Tests/php_monetdb.SQL.bat
sql/test/mapi/Tests/php_monetdb.SQL.sh
testing/Mtest.py.in
Branch: default
Log Message:
Mtest: make running perl and php test easier
Set PERLLIB and some helpers for PHP to find the installed libraries in
our non-standard locations. By exporting PERLLIB, perl tests can find
libs transparently.
diffs (120 lines):
diff --git a/monetdb5/tests/mapi/Tests/perl_dbi.MAL.bat
b/monetdb5/tests/mapi/Tests/perl_dbi.MAL.bat
--- a/monetdb5/tests/mapi/Tests/perl_dbi.MAL.bat
+++ b/monetdb5/tests/mapi/Tests/perl_dbi.MAL.bat
@@ -1,10 +1,5 @@
@echo off
-set PATH=%CLIENTS_PREFIX%\lib\MonetDB\Tests;%PATH%
-
-if "%PERL_LIBDIR%" == "" set PERL_LIBDIR=share\MonetDB\perl
-set PERLLIB=%CLIENTS_PREFIX%\%PERL_LIBDIR%
-
prompt # $t $g
echo on
diff --git a/monetdb5/tests/mapi/Tests/perl_dbi.MAL.sh
b/monetdb5/tests/mapi/Tests/perl_dbi.MAL.sh
--- a/monetdb5/tests/mapi/Tests/perl_dbi.MAL.sh
+++ b/monetdb5/tests/mapi/Tests/perl_dbi.MAL.sh
@@ -1,14 +1,3 @@
#!/bin/sh
-eval "`perl -V:installvendorarch`"
-eval "`perl -V:installprefix`"
-inspfxlen=`echo $installprefix | wc -c`
-
-prefix="`type -P malsample.pl`"
-prefix="`dirname $prefix`"
-prefix="`dirname $prefix`"
-
-PERLLIB="$prefix`echo $installvendorarch | cut -c${inspfxlen}-`"
-export PERLLIB
-
Mlog -x "malsample.pl $MAPIPORT $TSTDB"
diff --git a/sql/test/mapi/Tests/perl_dbi.SQL.bat
b/sql/test/mapi/Tests/perl_dbi.SQL.bat
--- a/sql/test/mapi/Tests/perl_dbi.SQL.bat
+++ b/sql/test/mapi/Tests/perl_dbi.SQL.bat
@@ -1,10 +1,5 @@
@echo off
-set PATH=%CLIENTS_PREFIX%\lib\MonetDB\Tests;%PATH%
-
-if "%PERL_LIBDIR%" == "" set PERL_LIBDIR=share\MonetDB\perl
-set PERLLIB=%CLIENTS_PREFIX%\%PERL_LIBDIR%
-
prompt # $t $g
echo on
diff --git a/sql/test/mapi/Tests/perl_dbi.SQL.sh
b/sql/test/mapi/Tests/perl_dbi.SQL.sh
--- a/sql/test/mapi/Tests/perl_dbi.SQL.sh
+++ b/sql/test/mapi/Tests/perl_dbi.SQL.sh
@@ -1,14 +1,3 @@
#!/bin/sh
-eval "`perl -V:installvendorarch`"
-eval "`perl -V:installprefix`"
-inspfxlen=`echo $installprefix | wc -c`
-
-prefix="`type -P sqlsample.pl`"
-prefix="`dirname $prefix`"
-prefix="`dirname $prefix`"
-
-PERLLIB="$prefix`echo $installvendorarch | cut -c${inspfxlen}-`"
-export PERLLIB
-
Mlog -x "sqlsample.pl $MAPIPORT $TSTDB"
diff --git a/sql/test/mapi/Tests/php_monetdb.SQL.bat
b/sql/test/mapi/Tests/php_monetdb.SQL.bat
--- a/sql/test/mapi/Tests/php_monetdb.SQL.bat
+++ b/sql/test/mapi/Tests/php_monetdb.SQL.bat
@@ -1,8 +1,6 @@
@echo off
-call monetdb-clients-config --internal
-
prompt # $t $g
echo on
-php -n -d "include_path=%datadir%\php" -f "%pkglibdir%\Tests\sqlsample.php"
%MAPIPORT%
+php -n -d "include_path=%PHP_INCPATH%" -f "%BINDIR%\sqlsample.php" %MAPIPORT%
diff --git a/sql/test/mapi/Tests/php_monetdb.SQL.sh
b/sql/test/mapi/Tests/php_monetdb.SQL.sh
--- a/sql/test/mapi/Tests/php_monetdb.SQL.sh
+++ b/sql/test/mapi/Tests/php_monetdb.SQL.sh
@@ -1,8 +1,3 @@
#!/bin/sh
-path="`type -P sqlsample.php`"
-dir="`dirname $path`"
-dir="`dirname $dir`"
-dir="$dir/share/php"
-
-Mlog -x "php -n -d include_path=$dir -f $path $MAPIPORT $TSTDB"
+Mlog -x "php -n -d include_path=$PHP_INCPATH -f $BINDIR/sqlsample.php
$MAPIPORT $TSTDB"
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -2766,10 +2766,7 @@
CONDITIONALS[C] = '#'
# check for known JARs in CLASSPATH directories
# + fall-back using pkgdatadir/lib
- # and pkgdatadir/Tests
- cpx += _configure(os.path.join('@QXdatadir@','MonetDB','lib'))
- cpx += os.pathsep
- cpx += _configure(os.path.join('@QXdatadir@','MonetDB','Tests'))
+ cpx += _configure(os.path.join('@QXdatadir@','monetdb','lib'))
for d in cpx.split(os.pathsep):
if os.path.isdir(d):
for f in os.listdir(d):
@@ -3449,6 +3446,14 @@
# print v+" = "+str(env[v])
#STDOUT.flush()
+ # inject vars that tell various languages where to find their libs
+ env['PERLLIB'] = _configure(os.path.join('@QXprefix@', '@PERL_LIBDIR@'))
+# set dynamically for python test lib
+# env['PYTHONPATH'] = _configure(os.path.join('@QXprefix@',
'@PYTHON_LIBDIR@'));
+ env['PHP_INCPATH'] = _configure(os.path.join('@datadir@', 'php'))
+ env['BINDIR'] = _configure('@bindir@')
+ vars_ = vars_ + ['PERLLIB', 'PHP_INCPATH', 'BINDIR']
+
# find mil script for MIL and SQL server
if THISFILE == "Mtest.py":
env['SQL_TRACE'] = ""
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list