From: Johannes Berg Date: Thu, 31 Oct 2013 14:36:44 +0000 (+0100) Subject: hwsim tests: Create results database in VM tests X-Git-Tag: hostap_2_1~683 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63f83fac0d572af6201660251d646d26e6bab320;p=thirdparty%2Fhostap.git 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 --- diff --git a/tests/hwsim/run-tests.py b/tests/hwsim/run-tests.py index dea8a8ebe..b486013e8 100755 --- a/tests/hwsim/run-tests.py +++ b/tests/hwsim/run-tests.py @@ -155,6 +155,8 @@ def main(): if args.database: import sqlite3 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: conn = None diff --git a/tests/hwsim/vm/inside.sh b/tests/hwsim/vm/inside.sh index 7645083be..cbef72794 100755 --- a/tests/hwsim/vm/inside.sh +++ b/tests/hwsim/vm/inside.sh @@ -63,6 +63,7 @@ else # finally run the tests export USER=0 export LOGDIR=/tmp/logs + export DBFILE=$LOGDIR/results.db cd $TESTDIR ./run-all.sh $ARGS >/dev/ttyS0 2>&1