diff options
Diffstat (limited to 'tko/frontend.py')
-rwxr-xr-x | tko/frontend.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tko/frontend.py b/tko/frontend.py index c48c5a18..7ffe8d24 100755 --- a/tko/frontend.py +++ b/tko/frontend.py @@ -64,6 +64,15 @@ class test: return tests + @classmethod + def select_sql(klass, db, sql, values): + fields = ['test_idx', 'job_idx', 'test', 'subdir', + 'kernel_idx', 'status', 'reason', 'machine_idx'] + fields = ['t.'+field for field in fields] + rows = db.select_sql(','.join(fields), 'tests', sql, values) + return [klass(db, *row) for row in rows] + + def __init__(self, db, test_idx, job_idx, testname, subdir, kernel_idx, status_num, reason, machine_idx): self.idx = test_idx self.job = job(db, job_idx) |