hwsim tests: Create results database in VM tests

Create a results.db in the output directory when running
the tests in a VM. To make that easier, create the tables
in the python script if they don't exist.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg 2013-10-31 15:36:44 +01:00 committed by Jouni Malinen
parent 4a1b8901ab
commit 63f83fac0d
2 changed files with 3 additions and 0 deletions

View file

@ -155,6 +155,8 @@ def main():
if args.database: if args.database:
import sqlite3 import sqlite3
conn = sqlite3.connect(args.database) conn = sqlite3.connect(args.database)
conn.execute('CREATE TABLE IF NOT EXISTS results (test,result,run,time,duration,build,commitid)')
conn.execute('CREATE TABLE IF NOT EXISTS tests (test,description)')
else: else:
conn = None conn = None

View file

@ -63,6 +63,7 @@ else
# finally run the tests # finally run the tests
export USER=0 export USER=0
export LOGDIR=/tmp/logs export LOGDIR=/tmp/logs
export DBFILE=$LOGDIR/results.db
cd $TESTDIR cd $TESTDIR
./run-all.sh $ARGS >/dev/ttyS0 2>&1 ./run-all.sh $ARGS >/dev/ttyS0 2>&1