use tmpfs at /dev/shm to speedup unit test execution

This commit is contained in:
Thomas Müller 2013-07-30 17:41:52 +02:00
parent 10939b0bdf
commit 01165fbd22
1 changed files with 11 additions and 5 deletions

View File

@ -10,9 +10,15 @@
DATABASENAME=oc_autotest$EXECUTOR_NUMBER DATABASENAME=oc_autotest$EXECUTOR_NUMBER
DATABASEUSER=oc_autotest$EXECUTOR_NUMBER DATABASEUSER=oc_autotest$EXECUTOR_NUMBER
ADMINLOGIN=admin$EXECUTOR_NUMBER ADMINLOGIN=admin$EXECUTOR_NUMBER
DATADIR=data-autotest
BASEDIR=$PWD BASEDIR=$PWD
# use tmpfs for datadir - should speedup unit test execution
if [ -d /dev/shm ]; then
DATADIR=/dev/shm/data-autotest$EXECUTOR_NUMBER
else
DATADIR=$BASEDIR/data-autotest
fi
echo "Using database $DATABASENAME" echo "Using database $DATABASENAME"
# create autoconfig for sqlite, mysql and postgresql # create autoconfig for sqlite, mysql and postgresql
@ -24,7 +30,7 @@ cat > ./tests/autoconfig-sqlite.php <<DELIM
'dbtableprefix' => 'oc_', 'dbtableprefix' => 'oc_',
'adminlogin' => '$ADMINLOGIN', 'adminlogin' => '$ADMINLOGIN',
'adminpass' => 'admin', 'adminpass' => 'admin',
'directory' => '$BASEDIR/$DATADIR', 'directory' => '$DATADIR',
); );
DELIM DELIM
@ -36,7 +42,7 @@ cat > ./tests/autoconfig-mysql.php <<DELIM
'dbtableprefix' => 'oc_', 'dbtableprefix' => 'oc_',
'adminlogin' => '$ADMINLOGIN', 'adminlogin' => '$ADMINLOGIN',
'adminpass' => 'admin', 'adminpass' => 'admin',
'directory' => '$BASEDIR/$DATADIR', 'directory' => '$DATADIR',
'dbuser' => '$DATABASEUSER', 'dbuser' => '$DATABASEUSER',
'dbname' => '$DATABASENAME', 'dbname' => '$DATABASENAME',
'dbhost' => 'localhost', 'dbhost' => 'localhost',
@ -52,7 +58,7 @@ cat > ./tests/autoconfig-pgsql.php <<DELIM
'dbtableprefix' => 'oc_', 'dbtableprefix' => 'oc_',
'adminlogin' => '$ADMINLOGIN', 'adminlogin' => '$ADMINLOGIN',
'adminpass' => 'admin', 'adminpass' => 'admin',
'directory' => '$BASEDIR/$DATADIR', 'directory' => '$DATADIR',
'dbuser' => '$DATABASEUSER', 'dbuser' => '$DATABASEUSER',
'dbname' => '$DATABASENAME', 'dbname' => '$DATABASENAME',
'dbhost' => 'localhost', 'dbhost' => 'localhost',
@ -68,7 +74,7 @@ cat > ./tests/autoconfig-oci.php <<DELIM
'dbtableprefix' => 'oc_', 'dbtableprefix' => 'oc_',
'adminlogin' => '$ADMINLOGIN', 'adminlogin' => '$ADMINLOGIN',
'adminpass' => 'admin', 'adminpass' => 'admin',
'directory' => '$BASEDIR/$DATADIR', 'directory' => '$DATADIR',
'dbuser' => '$DATABASENAME', 'dbuser' => '$DATABASENAME',
'dbname' => 'XE', 'dbname' => 'XE',
'dbhost' => 'localhost', 'dbhost' => 'localhost',