summaryrefslogtreecommitdiff
path: root/testsuite.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-01-17 12:56:13 +0100
committerUlf Magnusson <ulfalizer@gmail.com>2018-01-17 13:53:30 +0100
commit7dc5b74229e83876307082712162d48e3124e10b (patch)
tree63bff50cc694920ccc181092411bae2a7915ac43 /testsuite.py
parent67ef1d201644664afdfa2373e72495280a0c3fa0 (diff)
Detect recursive 'source' and print backtrace
Easier to debug than a RecursionError. Point out in the exception message that a common cause is environment variables not being set correctly.
Diffstat (limited to 'testsuite.py')
-rw-r--r--testsuite.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite.py b/testsuite.py
index 8306c05..a876f0e 100644
--- a/testsuite.py
+++ b/testsuite.py
@@ -779,6 +779,17 @@ g
verify_locations([c.syms["COMMENT_HOOK"].nodes[0].next],
"tests/Klocation_included:15")
+ # Test recursive 'source' detection
+
+ got_syntax_exception = False
+ try:
+ Kconfig("Kconfiglib/tests/Krecursive1")
+ except KconfigSyntaxError:
+ got_syntax_exception = True
+
+ verify(got_syntax_exception,
+ "recursive 'source' did not raise KconfigSyntaxError")
+
print("Testing visibility")