From 5cd9d8cfd165c1028b584b19b1e4c7fbe5372f34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=AD=20Bol=C3=ADvar?= Date: Wed, 22 Jan 2020 12:38:30 -0800 Subject: [PATCH] manifest: fix AttributeError in self import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This only passed CI because we had no coverage. Now we do. Signed-off-by: Martí Bolívar --- src/west/manifest.py | 2 +- tests/test_manifest.py | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/west/manifest.py b/src/west/manifest.py index 0d5263d..d8202b3 100644 --- a/src/west/manifest.py +++ b/src/west/manifest.py @@ -635,7 +635,7 @@ class Manifest: for subimp in imp: self._import_from_self(mp, subimp, projects) elif imptype == dict: - self._import_map(mp, imp, self.import_path_from_self, projects) + self._import_map(mp, imp, self._import_path_from_self, projects) else: self._malformed(f'{mp.abspath}: "self: import: {imp}" ' f'has invalid type {imptype}') diff --git a/tests/test_manifest.py b/tests/test_manifest.py index 70ef1a5..dfb126e 100644 --- a/tests/test_manifest.py +++ b/tests/test_manifest.py @@ -1676,6 +1676,21 @@ _IMPORT_SELF_MANIFESTS = [ - west.d/02-vendor-hals.yml - west.d/03-applications.yml ''' + # as an equivalent map: + '''\ + manifest: + remotes: + - name: upstream + url-base: upstream.com + projects: + - name: upstream + remote: upstream + revision: refs/tags/v1.0 + import: true + self: + import: + file: west.d + ''' ] _IMPORT_SELF_SUBMANIFESTS = {