Neels Hofmeyr | 3531a19 | 2017-03-28 14:30:28 +0200 | [diff] [blame] | 1 | # osmo_gsm_tester: context for individual test runs |
Neels Hofmeyr | dae3d3c | 2017-03-28 12:16:58 +0200 | [diff] [blame] | 2 | # |
| 3 | # Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH |
| 4 | # |
| 5 | # Author: Neels Hofmeyr <neels@hofmeyr.de> |
| 6 | # |
| 7 | # This program is free software: you can redistribute it and/or modify |
| 8 | # it under the terms of the GNU Affero General Public License as |
| 9 | # published by the Free Software Foundation, either version 3 of the |
| 10 | # License, or (at your option) any later version. |
| 11 | # |
| 12 | # This program is distributed in the hope that it will be useful, |
| 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | # GNU Affero General Public License for more details. |
| 16 | # |
| 17 | # You should have received a copy of the GNU Affero General Public License |
| 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 19 | |
Neels Hofmeyr | 3531a19 | 2017-03-28 14:30:28 +0200 | [diff] [blame] | 20 | # These will be initialized before each test run. |
| 21 | # A test script can thus establish its context by doing: |
| 22 | # from osmo_gsm_tester.test import * |
| 23 | trial = None |
| 24 | suite = None |
| 25 | test = None |
| 26 | resources = None |
| 27 | log = None |
| 28 | dbg = None |
| 29 | err = None |
| 30 | wait = None |
| 31 | sleep = None |
| 32 | poll = None |
| 33 | prompt = None |
Neels Hofmeyr | a88b0c7 | 2017-05-07 02:15:48 +0200 | [diff] [blame] | 34 | Timeout = None |
Neels Hofmeyr | dae3d3c | 2017-03-28 12:16:58 +0200 | [diff] [blame] | 35 | |
Neels Hofmeyr | a88b0c7 | 2017-05-07 02:15:48 +0200 | [diff] [blame] | 36 | def setup(suite_run, _test, ofono_client, suite_module): |
| 37 | global trial, suite, test, resources, log, dbg, err, wait, sleep, poll, prompt, Timeout |
Neels Hofmeyr | 3531a19 | 2017-03-28 14:30:28 +0200 | [diff] [blame] | 38 | trial = suite_run.trial |
| 39 | suite = suite_run |
| 40 | test = _test |
| 41 | resources = suite_run.reserved_resources |
| 42 | log = test.log |
| 43 | dbg = test.dbg |
| 44 | err = test.err |
| 45 | wait = suite_run.wait |
| 46 | sleep = suite_run.sleep |
| 47 | poll = suite_run.poll |
| 48 | prompt = suite_run.prompt |
Neels Hofmeyr | a88b0c7 | 2017-05-07 02:15:48 +0200 | [diff] [blame] | 49 | Timeout = suite_module.Timeout |
Neels Hofmeyr | dae3d3c | 2017-03-28 12:16:58 +0200 | [diff] [blame] | 50 | |
Neels Hofmeyr | dae3d3c | 2017-03-28 12:16:58 +0200 | [diff] [blame] | 51 | # vim: expandtab tabstop=4 shiftwidth=4 |