diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-12-16 09:09:50 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-12-16 14:07:05 +0100 |
commit | 3dc958d56fbf0ffe700b7852dbdb5b6268491d84 (patch) | |
tree | 24a02f5ade55a7d4d338131cfb28b890dd586282 /testsuite/gna/testsuite.py | |
parent | a67fe7a5c0ff4e59db6e62ed24edaddb8c9b2830 (diff) | |
download | ghdl-3dc958d56fbf0ffe700b7852dbdb5b6268491d84.tar.gz ghdl-3dc958d56fbf0ffe700b7852dbdb5b6268491d84.tar.bz2 ghdl-3dc958d56fbf0ffe700b7852dbdb5b6268491d84.zip |
testsuite.py: add stats, stop in case of error.
Diffstat (limited to 'testsuite/gna/testsuite.py')
-rwxr-xr-x | testsuite/gna/testsuite.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/testsuite/gna/testsuite.py b/testsuite/gna/testsuite.py index d8859400e..670a3b13d 100755 --- a/testsuite/gna/testsuite.py +++ b/testsuite/gna/testsuite.py @@ -34,9 +34,12 @@ def run(): for d in DIRS: tests.extend(glob.glob(d)) + start_time = time.time() jobs = [] poll = [] - num = 0 + nbr_tests = len(tests) + nbr_run = 0 + nbr_err = 0 while len(tests) != 0 or len(jobs) != 0: # Start as many jobs as possible if len(tests) > 0 and len(jobs) < NUMJOBS: @@ -70,10 +73,14 @@ def run(): code = j.wait() if code != 0: print('############### Error for {}'.format(j.dirname)) + nbr_err += 1 + tests = [] jobs.remove(j) - num += 1 + nbr_run += 1 + end_time = time.time() - print('{} tests run'.format(num)) + print('{}/{} tests run in {} sec, {} failures'.format( + nbr_run, nbr_tests, end_time - start_time, nbr_err)) if __name__ == '__main__': |