Skip to content

Commit a8e3af1

Browse files
committed
qa: Do not assume running feature_asmap.py from source directory
1 parent 9bf7ca6 commit a8e3af1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/functional/feature_asmap.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
from test_framework.util import assert_equal
3131

3232
DEFAULT_ASMAP_FILENAME = 'ip_asn.map' # defined in src/init.cpp
33-
ASMAP = '../../src/test/data/asmap.raw' # path to unit test skeleton asmap
33+
ASMAP = 'src/test/data/asmap.raw' # path to unit test skeleton asmap
3434
VERSION = 'fec61fa21a9f46f3b17bdcd660d7f4cd90b966aad3aec593c99b35f0aca15853'
3535

3636
def expected_messages(filename):
@@ -133,7 +133,8 @@ def run_test(self):
133133
self.node = self.nodes[0]
134134
self.datadir = self.node.chain_path
135135
self.default_asmap = os.path.join(self.datadir, DEFAULT_ASMAP_FILENAME)
136-
self.asmap_raw = os.path.join(os.path.dirname(os.path.realpath(__file__)), ASMAP)
136+
base_dir = self.config["environment"]["SRCDIR"]
137+
self.asmap_raw = os.path.join(base_dir, ASMAP)
137138

138139
self.test_without_asmap_arg()
139140
self.test_asmap_with_absolute_path()

0 commit comments

Comments
 (0)