• Dylan Baker's avatar
    framework: replace TestResult dict with an object · b365367f
    Dylan Baker authored
    This is a very invasive patch, because it replaces one of our core
    data-structures with a completely different kind of object. This new
    object is not a dict-like object (it doesn't use obj[key] = value
    syntax), instead it's a standard object with the standard object
    attributes. So result['time'] becomes result.time.
    This approach has a couple of advantages. First, it allows us to use
    properties, which allows us to encapsulate a lot of distributed logic
    from the summary module in the results module, and in a way that is
    easier to test for correctness. The second advantage of that
    encapsulation is that correct behavior is used everywhere, instead of
    just in most places. Finally, it allows us to use the flyweight pattern
    on the results objects, limiting the amount of memory consumed.
    Signed-off-by: default avatarDylan Baker <dylanx.c.baker@intel.com>
dmesg.py 8.61 KB