@@ -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