Commit 1cb39657 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

algo/tests/ summarize .tap tests output, creating a list of failed tests

Now on should-get tests.
See #3033.
parent b7e6ef18
'''Get status from TAPS, output stats as well as FAILED_TESTS_SH'''
from __future__ import print_function
import sys
import glob
from collections import defaultdict
TAPS = 'should-get-tests/*.tap'
TEST_COMMAND = 'sh %s.should-get'
stats = defaultdict(int)
failed = open(FAILED_TESTS_SH, 'w')
for tap in glob.glob('should-get-tests/*.tap'):
ok = True
for l in open(tap):
if 'not ok' in l:
ok = False
if not ok:
failed.write(TEST_COMMAND % tap.replace('.tap', '') + '\n')
stats[ok] += 1
print("=== %s " % TAPS,
"--> %s ok, %s bad, %s total" % (stats[True], stats[False], stats[True] + stats[False]), end='')
if stats[False]:
print(" --> %s" % FAILED_TESTS_SH)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment