summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2017-09-27 16:30:16 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2017-09-27 17:08:30 +0200
commitdd133fe034274ea6bdd2c738241191087a92a3c7 (patch)
tree85f6ec7a72ac899a2c2a55dbfbe6a61f74bb1804
parentf76a5240e217c5ba4bc752e9f7705b7cb67997d7 (diff)
Warn if the Makefile patch hasn't been applied
The old error from the test suite was cryptic.
-rw-r--r--testsuite.py13
1 files 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"