diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2012-11-25 14:59:26 -0800 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2012-11-25 14:59:26 -0800 |
commit | 53b841f1c5bfec9fa38faa2ef2d3654842fceade (patch) | |
tree | debf6d494a5c837ffd9031b23f29d90c4297f9e9 | |
parent | 322c7693e224c7eec25a929b575d87709fc183a3 (diff) |
actually writing results to the database! wooooooo
-rw-r--r-- | framework/database.py | 4 | ||||
-rw-r--r-- | framework/runner.py | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/framework/database.py b/framework/database.py index 2404d7d..926e49f 100644 --- a/framework/database.py +++ b/framework/database.py @@ -71,3 +71,7 @@ class ResultDatabase: c = self.connection.cursor() xs = c.execute('SELECT test_name FROM results WHERE run_id = ? AND result IS NULL', [run]) return [x[0] for x in xs] + + def writeResult(self, run, name, command, result): + c = self.connection.cursor() + c.execute('UPDATE results SET command = ?, result = ?, return_code = ?, errors = ?, output = ? WHERE run_id = ? AND test_name = ? AND result IS NULL', (' '.join(command), result['status'], result['exitcode'], result['err'], result['out'], run, name)) diff --git a/framework/runner.py b/framework/runner.py index e52d73f..ecfc198 100644 --- a/framework/runner.py +++ b/framework/runner.py @@ -33,6 +33,8 @@ def resume(db, config, args, tests, runID): name, test = data result = test.run(timeout) + + db.writeResult(runID, name, test.command, result) print(name + ':', result['status']) todo = [(name, tests[name]) for name in placeholders] |