summaryrefslogtreecommitdiffstats
path: root/autotest.sh
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-07-30 17:41:52 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2013-07-30 17:41:52 +0200
commit01165fbd2208a0c934dbe58cb4100e8d51fb4f7e (patch)
tree05756657d57ac36d8507babc38fd7256a64127e5 /autotest.sh
parent10939b0bdfed1474840fbf43e0cff0ef74f7846f (diff)
downloadnextcloud-server-01165fbd2208a0c934dbe58cb4100e8d51fb4f7e.tar.gz
nextcloud-server-01165fbd2208a0c934dbe58cb4100e8d51fb4f7e.zip
use tmpfs at /dev/shm to speedup unit test execution
Diffstat (limited to 'autotest.sh')
-rwxr-xr-xautotest.sh16
1 files changed, 11 insertions, 5 deletions
diff --git a/autotest.sh b/autotest.sh
index abe0b92586c..a343f6a25ab 100755
--- a/autotest.sh
+++ b/autotest.sh
@@ -10,9 +10,15 @@
DATABASENAME=oc_autotest$EXECUTOR_NUMBER
DATABASEUSER=oc_autotest$EXECUTOR_NUMBER
ADMINLOGIN=admin$EXECUTOR_NUMBER
-DATADIR=data-autotest
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"
# create autoconfig for sqlite, mysql and postgresql
@@ -24,7 +30,7 @@ cat > ./tests/autoconfig-sqlite.php <<DELIM
'dbtableprefix' => 'oc_',
'adminlogin' => '$ADMINLOGIN',
'adminpass' => 'admin',
- 'directory' => '$BASEDIR/$DATADIR',
+ 'directory' => '$DATADIR',
);
DELIM
@@ -36,7 +42,7 @@ cat > ./tests/autoconfig-mysql.php <<DELIM
'dbtableprefix' => 'oc_',
'adminlogin' => '$ADMINLOGIN',
'adminpass' => 'admin',
- 'directory' => '$BASEDIR/$DATADIR',
+ 'directory' => '$DATADIR',
'dbuser' => '$DATABASEUSER',
'dbname' => '$DATABASENAME',
'dbhost' => 'localhost',
@@ -52,7 +58,7 @@ cat > ./tests/autoconfig-pgsql.php <<DELIM
'dbtableprefix' => 'oc_',
'adminlogin' => '$ADMINLOGIN',
'adminpass' => 'admin',
- 'directory' => '$BASEDIR/$DATADIR',
+ 'directory' => '$DATADIR',
'dbuser' => '$DATABASEUSER',
'dbname' => '$DATABASENAME',
'dbhost' => 'localhost',
@@ -68,7 +74,7 @@ cat > ./tests/autoconfig-oci.php <<DELIM
'dbtableprefix' => 'oc_',
'adminlogin' => '$ADMINLOGIN',
'adminpass' => 'admin',
- 'directory' => '$BASEDIR/$DATADIR',
+ 'directory' => '$DATADIR',
'dbuser' => '$DATABASENAME',
'dbname' => 'XE',
'dbhost' => 'localhost',