From afcf2ea81c765cb6b116b9fa9c06838be65ed8c1 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Wed, 24 Oct 2012 16:10:56 -0700 Subject: [PATCH] coverage: note db table structure --- teuthology/coverage.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/teuthology/coverage.py b/teuthology/coverage.py index d49d804f744ba..8a31b439a2779 100644 --- a/teuthology/coverage.py +++ b/teuthology/coverage.py @@ -11,6 +11,26 @@ from teuthology import misc as teuthology log = logging.getLogger(__name__) +""" +The coverage database can be created in mysql with: + +CREATE TABLE `coverage` ( + `run_id` bigint(20) NOT NULL AUTO_INCREMENT, + `rev` char(40) NOT NULL, + `test` varchar(255) NOT NULL, + `suite` varchar(255) NOT NULL, + `lines` int(10) unsigned NOT NULL, + `line_cov` float unsigned NOT NULL, + `functions` int(10) unsigned NOT NULL, + `function_cov` float unsigned NOT NULL, + `branches` int(10) unsigned NOT NULL, + `branch_cov` float unsigned NOT NULL, + `run_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`run_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 + +""" + def connect_to_db(ctx): db = MySQLdb.connect( host=ctx.teuthology_config['coverage_db_host'], -- 2.39.5