[llvm-commits] [zorg] r146945 - in /zorg/trunk/lnt/lnt/server/db: testsuite.py testsuitedb.py
Daniel Dunbar
daniel at zuster.org
Mon Dec 19 17:14:23 PST 2011
Author: ddunbar
Date: Mon Dec 19 19:14:23 2011
New Revision: 146945
URL: http://llvm.org/viewvc/llvm-project?rev=146945&view=rev
Log:
[lnt/v0.4] lnt.server.db.testsuitedb: When binding test suites, store the constructed column instance with the field for ease of use when querying.
Modified:
zorg/trunk/lnt/lnt/server/db/testsuite.py
zorg/trunk/lnt/lnt/server/db/testsuitedb.py
Modified: zorg/trunk/lnt/lnt/server/db/testsuite.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/db/testsuite.py?rev=146945&r1=146944&r2=146945&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/db/testsuite.py (original)
+++ zorg/trunk/lnt/lnt/server/db/testsuite.py Mon Dec 19 19:14:23 2011
@@ -97,6 +97,10 @@
self.name = name
self.info_key = info_key
+ # Column instance for fields which have been bound (non-DB
+ # parameter). This is provided for convenience in querying.
+ self.column = None
+
def __repr__(self):
return '%s%r' % (self.__class__.__name__, (self.name, self.info_key))
@@ -124,6 +128,10 @@
self.info_key = info_key
self.ordinal = ordinal
+ # Column instance for fields which have been bound (non-DB
+ # parameter). This is provided for convenience in querying.
+ self.column = None
+
def __repr__(self):
return '%s%r' % (self.__class__.__name__, (self.name, self.info_key,
self.ordinal))
@@ -145,6 +153,10 @@
self.name = name
self.info_key = info_key
+ # Column instance for fields which have been bound (non-DB
+ # parameter). This is provided for convenience in querying.
+ self.column = None
+
def __repr__(self):
return '%s%r' % (self.__class__.__name__, (self.name, self.info_key))
@@ -171,6 +183,10 @@
self.type = type
self.info_key = info_key
+ # Column instance for fields which have been bound (non-DB
+ # parameter). This is provided for convenience in querying.
+ self.column = None
+
def __repr__(self):
return '%s%r' % (self.__class__.__name__, (self.name, self.type,
self.info_key))
Modified: zorg/trunk/lnt/lnt/server/db/testsuitedb.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/db/testsuitedb.py?rev=146945&r1=146944&r2=146945&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/db/testsuitedb.py (original)
+++ zorg/trunk/lnt/lnt/server/db/testsuitedb.py Mon Dec 19 19:14:23 2011
@@ -48,7 +48,8 @@
raise ValueError,"test suite defines reserved key %r" % (
name,)
- class_dict[item.name] = Column(item.name, String(256))
+ class_dict[item.name] = item.column = Column(
+ item.name, String(256))
def __init__(self, name):
self.name = name
@@ -73,7 +74,8 @@
raise ValueError,"test suite defines reserved key %r" % (
name,)
- class_dict[item.name] = Column(item.name, String(256))
+ class_dict[item.name] = item.column = Column(
+ item.name, String(256))
def __init__(self):
pass
@@ -113,7 +115,8 @@
raise ValueError,"test suite defines reserved key %r" % (
name,)
- class_dict[item.name] = Column(item.name, String(256))
+ class_dict[item.name] = item.column = Column(
+ item.name, String(256))
def __init__(self, machine, order, start_time, end_time):
self.machine = machine
@@ -166,16 +169,17 @@
name,)
if item.type.name == 'Real':
- class_dict[item.name] = Column(item.name, Float)
+ item.column = Column(item.name, Float)
elif item.type.name == 'Status':
- class_dict[item.name] = Column(item.name, Integer,
- ForeignKey(
+ item.column = Column(item.name, Integer, ForeignKey(
testsuite.StatusKind.id))
else:
raise ValueError,(
"test suite defines unknown sample type %r" (
item.type.name,))
+ class_dict[item.name] = item.column
+
def __init__(self, run, test):
self.run = run
self.test = test
More information about the llvm-commits
mailing list