Startup stuff, sourced from startup.ipy
In [1]:
# %load startup.ipy
#! /usr/bin/env python3
import sys
sys.path.append('./python')
import logging.config
import os
import xbx.database as xbxdb
import xbx.util as xbxu
import xbx.config as xbxc
import xbx.build as xbxb
import xbx.run as xbxr
logging.config.fileConfig("logging.ini", disable_existing_loggers=False)
CONFIG_PATH="config.ini"
xbxdb.init(xbxu.get_db_path(CONFIG_PATH))
config = xbxc.Config(CONFIG_PATH)
dbsession = xbxdb.scoped_session()
List RunSessions, ordered by descending timestamp
In [2]:
s=dbsession
l = s.query(xbxr.RunSession).order_by(xbxr.RunSession.timestamp.desc())
print([i.timestamp for i in l])
Print latest RunSession
In [3]:
rs=l.first()
print(rs)
We have overridden the __repr__ function in the base class for SqlAlchemy tables to print out the type, a dictionary of contents, and a list of relations.
Let's print out all build executions:
In [4]:
print([i for i in rs.build_execs])
Not much information here. Let's print out information on the builds associated with the build executions:
In [5]:
print([(i, i.build) for i in rs.build_execs])
Not very readable. Let's use prettyprint:
In [6]:
import pprint
pp = pprint.PrettyPrinter(indent=4)
pp.pprint([(i, i.build) for i in rs.build_execs])
Better, but not good. The overridden repr implementation is supposed to be evalable. Note that we need to import datetime and call repr explicitly. Let's try:
In [7]:
import datetime
pp.pprint([(eval(repr(i)), eval(repr(i.build))) for i in rs.build_execs])
Much better. We can see the 0hash and icepole implementations succeeded but the 0hash implementation failed. The log is mostly empty since we've rebuilt and thus there's not much makefile output.
We want to know why the aesgcm implementations failed. To do this, we must examine the runs relation.
In [8]:
import datetime
for i in rs.build_execs:
if not i.test_ok:
for j in i.runs:
print(j)
Too much stuff. Let's clean it up:
In [9]:
import datetime
for i in rs.build_execs:
if not i.test_ok:
for j in i.runs:
print('{}: {}'.format(i.build.buildid,j.checksumfail_cause))
In [9]:
In [ ]: