diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2021-10-26 13:18:59 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2021-10-26 13:18:59 +0200 |
commit | d6a19d976b699e0b230b2e6c8fdd11a0c832ae83 (patch) | |
tree | 5f098fbf57df782482914a71edc9df291474c355 /lib/loader | |
parent | ae8eef185bdfe54e12b9a6be142e8c1c7cdbf079 (diff) |
kconfig loader: load kconfig from its base directory
this ensures that source statements are handled correctly
Diffstat (limited to 'lib/loader')
-rw-r--r-- | lib/loader/kconfig.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/loader/kconfig.py b/lib/loader/kconfig.py index 631892f..42181c9 100644 --- a/lib/loader/kconfig.py +++ b/lib/loader/kconfig.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 from .. import kconfiglib +from dfatool.utils import cd from frozendict import frozendict import json import os @@ -20,7 +21,10 @@ class KConfigAttributes: elif os.path.exists(config_path): failed_experiments.append(config_path) - kconf = kconfiglib.Kconfig(kconfig_path) + kconfig_dir = "/".join(kconfig_path.split("/")[:-1]) + + with cd(kconfig_dir): + kconf = kconfiglib.Kconfig(kconfig_path) self.kconf = kconf self.kconfig_hash = self.file_hash(kconfig_path) |