File: run-test

package info (click to toggle)
libaws 20.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 16,656 kB
  • sloc: ada: 95,505; python: 2,270; ansic: 1,017; makefile: 829; xml: 235; javascript: 202; java: 112; sh: 106
file content (36 lines) | stat: -rw-r--r-- 932 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env python
"""Usage: run-test [options] test_dir

Run a single test located in test_dir
"""

from gnatpython.main import Main
from gnatpython.testdriver import TestRunner, add_run_test_options

import sys


def main():
    """Run a single test"""
    m = Main(add_targets_options=True)
    add_run_test_options(m)
    m.parse_args()
    if not m.args:
        sys.exit("Error: 1 argument expected. See -h")

    if m.options.restricted_discs is not None:
        m.options.restricted_discs = m.options.restricted_discs.split(',')
    t = TestRunner(m.args[0],
                   m.options.discs,
                   m.options.output_dir,
                   m.options.tmp,
                   m.options.enable_cleanup,
                   m.options.restricted_discs,
                   len(m.args) > 1 and m.args[1:] or None,
                   m.options.failed_only)

    t.execute()


if __name__ == '__main__':
    main()