From dd133fe034274ea6bdd2c738241191087a92a3c7 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Wed, 27 Sep 2017 16:30:16 +0200 Subject: Warn if the Makefile patch hasn't been applied The old error from the test suite was cryptic. --- testsuite.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/testsuite.py b/testsuite.py index 906a697..5263720 100644 --- a/testsuite.py +++ b/testsuite.py @@ -40,6 +40,7 @@ from __future__ import print_function +import errno import kconfiglib import os import platform @@ -2433,8 +2434,16 @@ def equal_confs(): with open(".config") as menu_conf: l1 = menu_conf.readlines() - with open("._config") as my_conf: - l2 = my_conf.readlines() + try: + my_conf = open("._config") + except IOError as e: + if e.errno != errno.ENOENT: + raise + print("._config not found. Did you forget to apply the Makefile patch?") + return False + else: + with my_conf: + l2 = my_conf.readlines() # Skip the header generated by 'conf' unset_re = r"# CONFIG_(\w+) is not set" -- cgit v1.2.3