autotest.sh added: create an fresh environment using sqlite (mysql anf pg will follow) and executes the test suite

This commit is contained in:
Thomas Mueller 2012-07-13 13:55:15 +02:00
parent 5de2a292fc
commit fd0c6da410
1 changed files with 32 additions and 0 deletions

32
autotest.sh Executable file
View File

@ -0,0 +1,32 @@
#preparation
echo "Setup environment for sqlite testing ..."
DATADIR=data-autotest
rm -rf $DATADIR
mkdir $DATADIR
rm -rf config/config.php
#cp autotest/config.sqlite.php config/autoconfig.php
cat > ./config/autoconfig.php <<DELIM
<?php
\$AUTOCONFIG = array (
'installed' => false,
'dbtype' => 'sqlite',
'dbtableprefix' => 'oc_',
'datadirectory' => 'data',
'adminlogin' => 'admin',
'adminpass' => 'admin',
'directory' => '$PWD/$DATADIR',
);
DELIM
php -f index.php
#test execution
echo 'Testing with sqlite ...'
cd tests
php -f index.php -- xml
#
# TODO: create config for mysql and postgres
#