summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2012-11-25 13:21:22 -0800
committerKenneth Graunke <kenneth@whitecape.org>2012-11-25 13:21:22 -0800
commitbce1a8666b949d2290cf09b5ee31c8934b32e57f (patch)
treef3b1c7011ffede414296cf726102f315a9f6f9fb
parent1f76e0e7711bab92a12acf11ee0ea13c958b6595 (diff)
inserting stuff...but SLOWLY (45 seconds for oglc! eeeeesh.)
-rw-r--r--framework/database.py6
-rwxr-xr-xprograms/run.py5
2 files changed, 10 insertions, 1 deletions
diff --git a/framework/database.py b/framework/database.py
index ad0f93b..5e9e5d1 100644
--- a/framework/database.py
+++ b/framework/database.py
@@ -58,3 +58,9 @@ class ResultDatabase:
cursor = self.connection.cursor()
date = int(time.time())
cursor.execute('INSERT INTO runs VALUES(?,?,?,?)', (date, name, driver, sysinfo))
+ return date
+
+ def addPlaceholderResult(self, run, testName):
+ cursor = self.connection.cursor()
+ cursor.execute('INSERT INTO results(run_id, test_name) VALUES(?,?)',
+ (run, testName))
diff --git a/programs/run.py b/programs/run.py
index e0cbb99..c1f4a34 100755
--- a/programs/run.py
+++ b/programs/run.py
@@ -79,9 +79,12 @@ def main(argv, config):
db = ResultDatabase(config)
# Create test run in database
- db.createRun(args.name, 'driver', 'system')
+ runID = db.createRun(args.name, 'driver', 'system')
# Populate results with "not run yet"
+ for test in tests.keys():
+ db.addPlaceholderResult(runID, test)
+
# Resume
if __name__ == '__main__':