File: run_tests.py

package info (click to toggle)
lttoolbox 3.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,516 kB
  • sloc: cpp: 13,541; ansic: 3,131; python: 1,212; makefile: 17
file content (24 lines) | stat: -rwxr-xr-x 700 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/python3

import sys
import os
sys.path.append(os.path.realpath("."))
import unittest

os.environ['LTTOOLBOX_PATH'] = '../lttoolbox'
if len(sys.argv) > 1:
    os.environ['LTTOOLBOX_PATH'] = sys.argv[1]

modules = ['lt_proc', 'lt_trim', 'lt_print', 'lt_comp', 'lt_append',
           'lt_paradigm', 'lt_expand', 'lt_apply_acx', 'lt_compose',
           'lt_tmxproc', 'lt_merge']


if __name__ == "__main__":
    os.chdir(os.path.dirname(__file__))
    failures = 0
    for module in modules:
        suite = unittest.TestLoader().loadTestsFromName(module)
        res = unittest.TextTestRunner(verbosity = 2).run(suite)
        failures += len(res.failures)
    sys.exit(min(failures, 255))