From 14813c3a00068ad2b608a7986371923f8c3c01e9 Mon Sep 17 00:00:00 2001 From: "guillaume.lambert" Date: Fri, 19 Jun 2020 16:56:48 +0200 Subject: [PATCH] fix topology files relative paths in PCE functest Signed-off-by: guillaume.lambert Change-Id: I2e46402a1200129f68009994b37d59eadfb39a89 --- tests/transportpce_tests/1.2.1/test_pce.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/transportpce_tests/1.2.1/test_pce.py b/tests/transportpce_tests/1.2.1/test_pce.py index 5375dabc7..61f3b2ab6 100644 --- a/tests/transportpce_tests/1.2.1/test_pce.py +++ b/tests/transportpce_tests/1.2.1/test_pce.py @@ -30,15 +30,18 @@ class TransportPCEtesting(unittest.TestCase): @classmethod def _get_file(cls): - topo_bi_dir_file = "sample_configs/honeynode-topo.xml" + topo_bi_dir_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), + "..", "..", "sample_configs", "honeynode-topo.xml") if os.path.isfile(topo_bi_dir_file): with open(topo_bi_dir_file, 'r') as topo_bi_dir: cls.simple_topo_bi_dir_data = topo_bi_dir.read() - topo_uni_dir_file = "sample_configs/NW-simple-topology.xml" + topo_uni_dir_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), + "..", "..", "sample_configs", "NW-simple-topology.xml") if os.path.isfile(topo_uni_dir_file): with open(topo_uni_dir_file, 'r') as topo_uni_dir: cls.simple_topo_uni_dir_data = topo_uni_dir.read() - topo_uni_dir_complex_file = "sample_configs/NW-for-test-5-4.xml" + topo_uni_dir_complex_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), + "..", "..", "sample_configs", "NW-for-test-5-4.xml") if os.path.isfile(topo_uni_dir_complex_file): with open(topo_uni_dir_complex_file, 'r') as topo_uni_dir_complex: cls.complex_topo_uni_dir_data = topo_uni_dir_complex.read() -- 2.36.6