Commit f53fd585 authored by Mathieu Giraud's avatar Mathieu Giraud

algo/tests: remove should-status.py

It is now included in 'should.py'.
parent 0b830b7e
'''Get status from TAPS, output stats as well as FAILED_TESTS_SH'''
from __future__ import print_function
import sys
import os
import glob
from collections import defaultdict
TAPS = 'should-get-tests/*.tap'
FAILED_TESTS_SH = './failed-should-get-tests.sh'
TEST_COMMAND = 'sh should-to-tap.sh %s.should-get'
stats = defaultdict(int)
failed = open(FAILED_TESTS_SH, 'w')
failed.write('#!/bin/sh\n\n')
for tap in glob.glob('should-get-tests/*.tap'):
ok = True
for l in open(tap):
if 'not ok' in l and not 'SKIP' in l and not 'TODO' in l:
ok = False
break
if not ok:
failed.write(TEST_COMMAND % tap.replace('.tap', '') + '\n')
stats[ok] += 1
failed.close()
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)
os.system('cat %s' % FAILED_TESTS_SH)
sys.exit(1)
print()
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