[llvm-commits] [zorg] r150750 - in /zorg/trunk/lnt/lnt: server/db/testsuitetypes.py tests/compile.py
Daniel Dunbar
daniel at zuster.org
Thu Feb 16 14:54:42 PST 2012
Author: ddunbar
Date: Thu Feb 16 16:54:42 2012
New Revision: 150750
URL: http://llvm.org/viewvc/llvm-project?rev=150750&view=rev
Log:
[lnt] lnt.server.db.testsuitetypes: Sketch a test suite definition for the
results generated by 'lnt runtest compile'.
- Still need to do some adaptation before the results fully work w/ the v0.4 DB.
Modified:
zorg/trunk/lnt/lnt/server/db/testsuitetypes.py
zorg/trunk/lnt/lnt/tests/compile.py
Modified: zorg/trunk/lnt/lnt/server/db/testsuitetypes.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/db/testsuitetypes.py?rev=150750&r1=150749&r2=150750&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/db/testsuitetypes.py (original)
+++ zorg/trunk/lnt/lnt/server/db/testsuitetypes.py Thu Feb 16 16:54:42 2012
@@ -8,8 +8,35 @@
from lnt.server.db import testsuite
+def get_compile_testsuite(db):
+ # Create a test suite compile with "lnt runtest compile".
+ ts = testsuite.TestSuite("compile", "compile")
+
+ # Promote some natural information to fields.
+ ts.machine_fields.append(testsuite.MachineField("hardware",
+ "hw.model"))
+ ts.machine_fields.append(testsuite.MachineField("os_version",
+ "kern.version"))
+
+ # The only reliable order currently is the "run_order" field. We will want
+ # to revise this over time.
+ ts.order_fields.append(testsuite.OrderField("llvm_project_revision",
+ "run_order", 0))
+
+ # We expect up to five fields per test, with a sole shared status field.
+ status = testsuite.SampleField(
+ "status", db.status_sample_type, ".status")
+ ts.sample_fields.append(status)
+ for name in ('user', 'sys', 'wall', 'size', 'mem'):
+ value = testsuite.SampleField(
+ "%s_time" % (name,), db.real_sample_type, ".%s" % (name,),
+ status_field = status)
+ ts.sample_fields.append(value)
+
+ return ts
+
def get_nts_testsuite(db):
- # Create an NT compatible test suite, automatically.
+ # Create a test suite compile with "lnt runtest nt".
ts = testsuite.TestSuite("nts", "NT")
# Promote the natural information produced by 'runtest nt' to fields.
@@ -41,6 +68,7 @@
return ts
_registry = {
+ 'compile' : get_compile_testsuite,
'nts' : get_nts_testsuite,
}
def get_testsuite_for_type(typename, db):
Modified: zorg/trunk/lnt/lnt/tests/compile.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/tests/compile.py?rev=150750&r1=150749&r2=150750&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/tests/compile.py (original)
+++ zorg/trunk/lnt/lnt/tests/compile.py Thu Feb 16 16:54:42 2012
@@ -609,7 +609,7 @@
# Execute the run.
run_info.update(variables)
- run_info['tag'] = 'simple'
+ run_info['tag'] = tag = 'compile'
testsamples = []
start_time = datetime.utcnow()
@@ -622,7 +622,7 @@
print >>sys.stderr, '%s: collected sample: %r: %r - %r' % (
datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S'),
name, info, samples)
- test_name = 'simple.' + name
+ test_name = '%s.%s' % (tag, name)
if not success:
testsamples.append(lnt.testing.TestSamples(
test_name + '.failed', [1], info))
More information about the llvm-commits
mailing list