mirror of
https://github.com/AdaCore/aws.git
synced 2026-02-12 12:29:46 -08:00
37 lines
932 B
Python
37 lines
932 B
Python
#!/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()
|