mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-28 15:36:25 +00:00
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>
This commit is contained in:
parent
74dc19a2f5
commit
b37ccace1e
@ -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):
|
||||
|
@ -2,3 +2,4 @@ import frrtest
|
||||
|
||||
class TestCli(frrtest.TestRefOut):
|
||||
program = './test_cli'
|
||||
built_refout = True
|
||||
|
Loading…
Reference in New Issue
Block a user