diff options
| author | David Lamparter <equinox@diac24.net> | 2018-08-18 05:00:54 +0200 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2018-09-08 21:30:19 +0200 |
| commit | b37ccace1e456487c825024fdbbeddad3e027061 (patch) | |
| tree | 70fb9fe7d68b7d3698f7657bdcadf95116789020 /tests/helpers/python/frrtest.py | |
| parent | 74dc19a2f5f72865b5f7da86453b881ae161e857 (diff) | |
tests: properly locate files in builddir
test_cli.refout is written by configure into the build directory, thus
we need a little special glue to find it correctly.
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'tests/helpers/python/frrtest.py')
| -rw-r--r-- | tests/helpers/python/frrtest.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/helpers/python/frrtest.py b/tests/helpers/python/frrtest.py index da9e447fc0..60bee5c88c 100644 --- a/tests/helpers/python/frrtest.py +++ b/tests/helpers/python/frrtest.py @@ -176,8 +176,14 @@ class TestRefOut(object): basedir = os.path.dirname(inspect.getsourcefile(type(self))) program = os.path.join(basedir, self.program) - refin = program + '.in' - refout = program + '.refout' + if getattr(self, 'built_refin', False): + refin = binpath(program) + '.in' + else: + refin = program + '.in' + if getattr(self, 'built_refout', False): + refout = binpath(program) + '.refout' + else: + refout = program + '.refout' intext = '' if os.path.exists(refin): |
