Пример #1
0
def summary(bld):
    lst = getattr(bld, 'utest_results', [])
    total = 0
    tfail = 0
    if lst:
        total = len(lst)
        tfail = len([x for x in lst if x[1]])
    waf_unit_test.summary(bld)
    if tfail > 0:
        bld.fatal("Build failed, because some tests failed!")
Пример #2
0
def summary(bld):
    lst = getattr(bld, 'utest_results', [])
    total = 0
    tfail = 0
    if lst:
        total = len(lst)
        tfail = len([x for x in lst if x[1]])
    waf_unit_test.summary(bld)
    if tfail > 0:
        bld.fatal("Build failed, because some tests failed!")
Пример #3
0
def summary(bld):
    from waflib.Tools import waf_unit_test
    lst = getattr(bld, 'utest_results', [])
    total = 0
    tfail = 0
    if lst:
        total = len(lst)
        tfail = len([x for x in lst if x[1]])
    waf_unit_test.summary(bld)
    # Logs.pprint('CYAN', 'Test execution summary')
    # Logs.pprint('CYAN', '  tests that pass %s' % str(total-tfail)+'/'+str(total))
    # for l in lst:
    #     if l[1]:
    #         continue
    #     Logs.pprint('CYAN', l[0])
    #     Logs.pprint('GREEN', l[2])
    # Logs.pprint('CYAN', '  tests that fail %s' % str(tfail)+'/'+str(total))
    # for l in lst:
    #     if not l[1]:
    #         continue
    #     Logs.pprint('CYAN', l[0])
    #     Logs.pprint('RED', l[2])
    if tfail > 0:
        bld.fatal("Build failed, because some tests failed!")