Neels Hofmeyr | dae3d3c | 2017-03-28 12:16:58 +0200 | [diff] [blame^] | 1 | #!/usr/bin/env python3 |
| 2 | |
| 3 | # osmo_gsm_tester: invoke a single test run |
| 4 | # |
| 5 | # Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH |
| 6 | # |
| 7 | # Author: Neels Hofmeyr <neels@hofmeyr.de> |
| 8 | # |
| 9 | # This program is free software: you can redistribute it and/or modify |
| 10 | # it under the terms of the GNU Affero General Public License as |
| 11 | # published by the Free Software Foundation, either version 3 of the |
| 12 | # License, or (at your option) any later version. |
| 13 | # |
| 14 | # This program is distributed in the hope that it will be useful, |
| 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | # GNU Affero General Public License for more details. |
| 18 | # |
| 19 | # You should have received a copy of the GNU Affero General Public License |
| 20 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 21 | |
| 22 | '''osmo_gsm_tester: invoke a single test run. |
| 23 | |
| 24 | ./run_once.py ~/path/to/test_package/ |
| 25 | |
| 26 | Upon launch, a 'test_package/run-<date>' directory will be created. |
| 27 | When complete, a symbolic link 'test_package/last_run' will point at this dir. |
| 28 | The run dir then contains logs and test results. |
| 29 | ''' |
| 30 | |
| 31 | import osmo_gsm_tester |
| 32 | |
| 33 | if __name__ == '__main__': |
| 34 | import argparse |
| 35 | |
| 36 | parser = argparse.ArgumentParser() |
| 37 | parser.add_argument('-V', '--version', action='store_true', |
| 38 | help='Show version') |
| 39 | parser.add_argument('test_package', nargs='*', |
| 40 | help='Directory containing binaries to test') |
| 41 | args = parser.parse_args() |
| 42 | |
| 43 | if args.version: |
| 44 | print(osmo_gsm_tester.__version__) |
| 45 | exit(0) |
| 46 | |
| 47 | |
| 48 | # vim: expandtab tabstop=4 shiftwidth=4 |