[U-Boot] [PATCH 2/6] test/py: parse include/autoconf.mk for config options
Stephen Warren
swarren at wwwdotorg.org
Wed Nov 18 04:20:00 CET 2015
From: Stephen Warren <swarren at nvidia.com>
Many config options aren't yet converted to Kconfig. Update the test
scripts to parse include/autoconf.mk to pick up the non-converted
options. This will allow tests to be marked as depending on those
options.
Signed-off-by: Stephen Warren <swarren at nvidia.com>
---
test/py/conftest.py | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/test/py/conftest.py b/test/py/conftest.py
index da8618ba998c..27f6f4d69c15 100644
--- a/test/py/conftest.py
+++ b/test/py/conftest.py
@@ -98,17 +98,20 @@ def pytest_configure(config):
continue
ubconfig.__dict__[k] = v
- dot_config = build_dir + "/.config"
- if not os.path.exists(dot_config):
- raise Exception(".config file does not exist; " +
- "try passing --build option?")
-
- with open(dot_config, "rt") as f:
- ini_str = "[root]\n" + f.read()
- ini_sio = StringIO.StringIO(ini_str)
- parser = ConfigParser.RawConfigParser()
- parser.readfp(ini_sio)
- ubconfig.buildconfig = dict(parser.items("root"))
+ ubconfig.buildconfig = dict()
+
+ for conf_file in (".config", "include/autoconf.mk"):
+ dot_config = build_dir + "/" + conf_file
+ if not os.path.exists(dot_config):
+ raise Exception(conf_file + " does not exist; " +
+ "try passing --build option?")
+
+ with open(dot_config, "rt") as f:
+ ini_str = "[root]\n" + f.read()
+ ini_sio = StringIO.StringIO(ini_str)
+ parser = ConfigParser.RawConfigParser()
+ parser.readfp(ini_sio)
+ ubconfig.buildconfig.update(parser.items("root"))
ubconfig.test_py_dir = test_py_dir
ubconfig.source_dir = source_dir
--
1.9.1
More information about the U-Boot
mailing list