summaryrefslogtreecommitdiff
path: root/testsuite.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2019-03-06 03:21:08 +0100
committerUlf Magnusson <ulfalizer@gmail.com>2019-03-06 03:51:04 +0100
commit132e579cb8e4bdd49eb057ea81f5f8528ff80cf9 (patch)
treed1edbc8723115860ab9542d3ab375169eeadeacd /testsuite.py
parent66557edc120faac569004ba2bc426c5ac6a1100b (diff)
Give more helpful error messages when files are missing
The current error message talks a lot about $srctree, but $srctree is seldom the culprit in practice. More common is 'source "$(SOME_ENV_VAR)/foo"`, where SOME_ENV_VAR hasn't been set. Include the complete 'source ...' line for missing Kconfig files, and mention unset environment variables as a hint. Only mention $srctree briefly. Also shorten the message when a .config can't be a found a bit. This message would usually only be seen when working directly with the library.
Diffstat (limited to 'testsuite.py')
-rw-r--r--testsuite.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/testsuite.py b/testsuite.py
index fbca36c..3301ed5 100644
--- a/testsuite.py
+++ b/testsuite.py
@@ -1059,7 +1059,7 @@ g
Kconfig("tests/Krecursive1")
except KconfigError as e:
verify_equal(str(e), """
-tests/Krecursive2:1: Recursive 'source' of 'tests/Krecursive1' detected. Check that environment variables are set correctly.
+tests/Krecursive2:1: recursive 'source' of 'tests/Krecursive1' detected. Check that environment variables are set correctly.
Include path:
tests/Krecursive1:1
tests/Krecursive2:1
@@ -1076,7 +1076,7 @@ tests/Krecursive2:1
try:
Kconfig("tests/Kmissingsource")
except KconfigError as e:
- if "does not exist" not in str(e):
+ if "not found" not in str(e):
fail("'source' with missing file raised wrong KconfigError")
except:
fail("'source' with missing file raised wrong exception")
@@ -1086,7 +1086,7 @@ tests/Krecursive2:1
try:
Kconfig("tests/Kmissingrsource")
except KconfigError as e:
- if "does not exist" not in str(e):
+ if "not found" not in str(e):
fail("'rsource' with missing file raised wrong KconfigError")
except:
fail("'rsource' with missing file raised wrong exception")