testing: Improve runtime of TNC tests by storing the SQLite DB in ramfs

This saves about 50%-70% of the time needed for scenarios that use a DB.
This commit is contained in:
Tobias Brunner
2015-11-09 15:18:38 +01:00
parent f24ec20ebb
commit 10fa70ee5c
14 changed files with 30 additions and 9 deletions
@@ -3,6 +3,9 @@ carol::iptables-restore < /etc/iptables.rules
dave::iptables-restore < /etc/iptables.rules
carol::echo 0 > /proc/sys/net/ipv4/ip_forward
dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id
moon::mv /etc/pts/data1.sql /tmp/
moon::mount -t ramfs -o size=5m ramfs /etc/pts
moon::mv /tmp/data1.sql /etc/pts/
moon::sed -i "s/NOW/`date +%s`/g" /etc/pts/data1.sql
moon::sed -i "s:DEBIAN_VERSION:\`cat /etc/debian_version\`:" /etc/pts/data1.sql
moon::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db