[Cig-commits] r3820 - in cs/regresstor/trunk/sandbox: . pyre
luis at geodynamics.org
luis at geodynamics.org
Mon Jun 19 14:24:33 PDT 2006
Author: luis
Date: 2006-06-19 14:24:33 -0700 (Mon, 19 Jun 2006)
New Revision: 3820
Added:
cs/regresstor/trunk/sandbox/pyre/
cs/regresstor/trunk/sandbox/pyre/Build.py
cs/regresstor/trunk/sandbox/pyre/FailedUnitSubtest.py
cs/regresstor/trunk/sandbox/pyre/Machine.py
cs/regresstor/trunk/sandbox/pyre/Project.py
cs/regresstor/trunk/sandbox/pyre/Run.py
cs/regresstor/trunk/sandbox/pyre/UnitTest.py
cs/regresstor/trunk/sandbox/pyre/UnitTestCheck.py
cs/regresstor/trunk/sandbox/pyre/Units.py
Log:
Pyre interface to regresstor.
Added: cs/regresstor/trunk/sandbox/pyre/Build.py
===================================================================
--- cs/regresstor/trunk/sandbox/pyre/Build.py 2006-06-19 20:10:34 UTC (rev 3819)
+++ cs/regresstor/trunk/sandbox/pyre/Build.py 2006-06-19 21:24:33 UTC (rev 3820)
@@ -0,0 +1,43 @@
+import pyre2.db
+
+class Build(pyre2.db.Table):
+
+ # the table name
+ table_name = "builds"
+
+ # the table columns
+ id = pyre2.db.integer(name="id", primary_key=True)
+ project_id = pyre2.db.integer(name="project_id", null=False)
+ machine_id = pyre2.db.integer(name="machine_id", null=False)
+ compiled = pyre2.db.boolean(name="compiled", null=False, default="'false'")
+ modified = pyre2.db.boolean(name="modified", null=False, default="'false'")
+ timestamp = pyre2.db.timestamp(name="timestamp",null=False,default="now()")
+ build_options = pyre2.db.varchar(name="build_options", length=200)
+ revision = pyre2.db.integer(name="revision")
+ cc = pyre2.db.varchar(name="cc", length=100)
+ who = pyre2.db.varchar(name="who", length=100)
+ makefile = pyre2.db.text(name="makefile")
+ log = pyre2.db.text(name="log")
+
+ # column constraints
+ project_id.constraints = "REFERENCES projects"
+ machine_id.constraints = "REFERENCES machines"
+
+ # table constraints
+ table_constraints = "UNIQUE (project_id, machine_id, timestamp)"
+ table_oids = True
+
+ # comments
+ table_comment = "Information about particular builds"
+ project_id.comment = "Project ID"
+ machine_id.comment = "Machine ID"
+ compiled.comment = "Was the build successful?"
+ modified.comment = "Was the source code locally modified?"
+ timestamp.comment = "Date & time of build attempt"
+ build_options.comment = "Special options used in build"
+ revision.comment = "Revision number of source code"
+ cc.comment = "Compiler"
+ who.comment = "Who submitted the build?"
+ makefile.comment = "Makefile used in build"
+ log.comment = "Generated log(s) from build"
+
Added: cs/regresstor/trunk/sandbox/pyre/FailedUnitSubtest.py
===================================================================
--- cs/regresstor/trunk/sandbox/pyre/FailedUnitSubtest.py 2006-06-19 20:10:34 UTC (rev 3819)
+++ cs/regresstor/trunk/sandbox/pyre/FailedUnitSubtest.py 2006-06-19 21:24:33 UTC (rev 3820)
@@ -0,0 +1,26 @@
+import pyre2.db
+
+class FailedUnitSubtest(pyre2.db.Table):
+
+ # the table name
+ table_name = "failed_unit_subtests"
+
+ # the table columns
+ id = pyre2.db.integer(name="id")
+ check_id = pyre2.db.integer(name="check_id", null=False)
+ subtest = pyre2.db.varchar(name="subtest", length=255, null=False)
+ output = pyre2.db.text(name="output", null=False)
+
+ # column constraints
+ id.constraints = "PRIMARY KEY"
+ check_id.constraints = "REFERENCES unit_test_checks"
+
+ # table constraints
+ table_constraints = "UNIQUE (check_id, subtest)"
+
+ # comments
+ table_comment = "Information about failed unit test checks"
+ check_id.comment = "UnitTestCheck ID"
+ subtest.comment = "UnitTest subtest which caused failure"
+ output.comment = "Binary file with failed output, if available"
+
Added: cs/regresstor/trunk/sandbox/pyre/Machine.py
===================================================================
--- cs/regresstor/trunk/sandbox/pyre/Machine.py 2006-06-19 20:10:34 UTC (rev 3819)
+++ cs/regresstor/trunk/sandbox/pyre/Machine.py 2006-06-19 21:24:33 UTC (rev 3820)
@@ -0,0 +1,36 @@
+import pyre2.db
+
+class Machine(pyre2.db.Table):
+
+ # the table name
+ table_name = "machines"
+
+ # the table columns
+ id = pyre2.db.integer(name="id")
+ hash = pyre2.db.varchar(name="hash", length=128)
+ name = pyre2.db.varchar(name="name", length=100)
+ os = pyre2.db.varchar(name="os", length=100)
+ kernel = pyre2.db.varchar(name="kernel", length=100)
+ hardware = pyre2.db.varchar(name="hardware", length=100)
+
+ # column constraints
+ id.constraints = "PRIMARY KEY"
+ hash.constraints = "NOT NULL"
+ name.constraints = "NOT NULL"
+ os.constraints = "NOT NULL"
+ kernel.constraints = "NOT NULL DEFAULT ''"
+ hardware.constraints = "NOT NULL DEFAULT ''"
+
+ # table constraints
+ table_constraints = "UNIQUE (name, os, kernel, hardware)"
+ table_oids = True
+
+ # comments
+ table_comment = "List of projects"
+ hash.comment = "Unique identifier assigned to machine"
+ name.comment = "Name of machine"
+ os.comment = "Operating system on machine"
+ kernel.comment = "Kernel for operating system"
+ hardware.comment = "Hardware on machine"
+ description.comment = "Additional information about machine"
+
Added: cs/regresstor/trunk/sandbox/pyre/Project.py
===================================================================
--- cs/regresstor/trunk/sandbox/pyre/Project.py 2006-06-19 20:10:34 UTC (rev 3819)
+++ cs/regresstor/trunk/sandbox/pyre/Project.py 2006-06-19 21:24:33 UTC (rev 3820)
@@ -0,0 +1,27 @@
+import pyre2.db
+
+class Project(pyre2.db.Table):
+
+ # the table name
+ table_name = "projects"
+
+ # the table columns
+ id = pyre2.db.integer(name="id")
+ name = pyre2.db.varchar(name="name", length=50)
+ mailfrom = pyre2.db.varchar(name="mailfrom", length=255)
+ mailto = pyre2.db.varchar(name="mailto", length=255)
+ description = pyre2.db.text(name="description")
+
+ # column constraints
+ id.constraints = "PRIMARY KEY"
+ name.constraints = "NOT NULL UNIQUE"
+
+ # table constraints
+ table_oids = True
+
+ # comments
+ table_comment = "List of projects"
+ name.comment = "Name of project"
+ mailfrom.comment = "Sender of notifications"
+ mailto.comment = "Recipient of notifications"
+ description.comment = "Addition information about project"
Added: cs/regresstor/trunk/sandbox/pyre/Run.py
===================================================================
--- cs/regresstor/trunk/sandbox/pyre/Run.py 2006-06-19 20:10:34 UTC (rev 3819)
+++ cs/regresstor/trunk/sandbox/pyre/Run.py 2006-06-19 21:24:33 UTC (rev 3820)
@@ -0,0 +1,30 @@
+import pyre2.db
+
+class Run(pyre2.db.Table):
+
+ # the table name
+ table_name = "runs"
+
+ # the table columns
+ id = pyre2.db.integer(name="id", primary_key=True)
+ build_id = pyre2.db.integer(name="build_id", null=False)
+ start_time = pyre2.db.timestamp(name="start_time", null=False)
+ end_time = pyre2.db.timestamp(name="end_time", null=True, default="NULL")
+ notified = pyre2.db.boolean(null=False, default="'false'")
+
+ # column constraints
+ build_id.constraints = "REFERENCES builds"
+ start_time.constraints = "DEFAULT now()"
+
+ # table constraints
+ table_constraint = "UNIQUE (build_id, start_time)"
+ table_oids = True
+
+ # comments
+ table_comment = "Information for particular runs"
+ build_id.comment = "Build ID"
+ start_time = "When the run started"
+ end_time = "When the run ended"
+ notified = "Has a notification email been sent?"
+
+
Added: cs/regresstor/trunk/sandbox/pyre/UnitTest.py
===================================================================
--- cs/regresstor/trunk/sandbox/pyre/UnitTest.py 2006-06-19 20:10:34 UTC (rev 3819)
+++ cs/regresstor/trunk/sandbox/pyre/UnitTest.py 2006-06-19 21:24:33 UTC (rev 3820)
@@ -0,0 +1,31 @@
+import pyre2.db
+
+class UnitTest(pyre2.db.Table):
+
+ # the table name
+ table_name = "unit_tests"
+
+ # the table columns
+ id = pyre2.db.integer(name="id", primary_key=True)
+ unit_id = pyre2.db.integer(name="unit_id", null=False)
+ name = pyre2.db.varchar(name="name", length=100)
+ description = pyre2.db.text(name="description", default="NULL")
+ priority = pyre2.db.integer(name="priority", null=False, default="1000")
+ version = pyre2.db.timestamp(name="version",null=False,default="now()")
+
+ # column constraints
+ unit_id.constraints = "REFERENCES units"
+
+ # table constraints
+ table_constraints = "UNIQUE (unit_id, name)"
+ table_oids = True
+
+ # comments
+ table_comment = "Information about unit tests"
+ unit_id.comment = "Unit ID"
+ name.comment = "Unit test name"
+ description.comment = "Description of unit test"
+ priority.comment = "Order of execution"
+ version.comment = "When was the unit test last added or modified?"
+
+
Added: cs/regresstor/trunk/sandbox/pyre/UnitTestCheck.py
===================================================================
--- cs/regresstor/trunk/sandbox/pyre/UnitTestCheck.py 2006-06-19 20:10:34 UTC (rev 3819)
+++ cs/regresstor/trunk/sandbox/pyre/UnitTestCheck.py 2006-06-19 21:24:33 UTC (rev 3820)
@@ -0,0 +1,27 @@
+import pyre2.db
+
+class UnitTestCheck(pyre2.db.Table):
+
+ # the table name
+ table_name = "unit_test_checks"
+
+ # the table columns
+ id = pyre2.db.integer(name="id")
+ run_id = pyre2.db.integer(name="run_id", null=False)
+ test_id = pyre2.db.integer(name="test_id", null=False)
+ passed = pyre2.db.boolean(name="passed", default="'false'")
+
+ # column constraints
+ id.constraints = "PRIMARY KEY"
+ run_id.constraints = "REFERENCES runs"
+ test_id.constraints = "REFERENCES unit_tests"
+
+ # table constraints
+ table_constraints = "UNIQUE (run_id, test_id)"
+ table_oids = True
+
+ # comments
+ table_comment = "Lists which unit tests passed and which failed"
+ run_id.comment = "Run ID"
+ test_id.comment = "UnitTest ID"
+ passed.comment = "Did the unit test run successfully?"
Added: cs/regresstor/trunk/sandbox/pyre/Units.py
===================================================================
--- cs/regresstor/trunk/sandbox/pyre/Units.py 2006-06-19 20:10:34 UTC (rev 3819)
+++ cs/regresstor/trunk/sandbox/pyre/Units.py 2006-06-19 21:24:33 UTC (rev 3820)
@@ -0,0 +1,30 @@
+import pyre2.db
+
+class Unit(pyre2.db.Table)
+
+ # the table name
+ table_name = "units"
+
+ # the table columns
+ id = pyre2.db.integer(name="id")
+ project_id = pyre2.db.integer(name="project_id")
+ name = pyre2.db.varchar(name="name", length=100)
+ description = pyre2.db.text(name="description")
+
+ # column constraints
+ id.constraints = "PRIMARY KEY"
+ project_id.constraints = "NOT NULL REFERENCES projects"
+ name.constraints = "NOT NULL"
+ description.constraints = "DEFAULT NULL"
+
+ # table constraints
+ table_constraints = "UNIQUE (project_id, name)"
+ table_oids = True
+
+ # comments
+ table_comment = "Information on units (set of tests)"
+ project_id.comment = "Project ID"
+ name.comment = "Unit name"
+ description.comment = "Description of unit"
+
+
More information about the Cig-commits
mailing list