summaryrefslogtreecommitdiff
path: root/testsuite.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-08-17 21:04:43 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2018-08-17 21:35:42 +0200
commit8a3999bc708e8468ff79665e3cbdfccd603160e1 (patch)
treef459c8ba2328764c6791d3d705973bae6352a085 /testsuite.py
parentb7be018fba77db3a9ff11faf980c600d4bbb2fa8 (diff)
Fix $srctree logic for the top-level Kconfig file
Due to a major design braino, the top-level Kconfig file passed to Kconfig.__init__() wasn't looked up relative to $srctree, breaking out-of-tree usage for e.g. menuconfig. With this change, Kconfig files are consistently looked up relative to $srctree, which makes a lot more sense. Also remove note re. loading a subset of Kconfig files. Saying that the top-level file and all source'd Kconfig files are looked up relative to $srctree should make the behavior clear enough.
Diffstat (limited to 'testsuite.py')
-rw-r--r--testsuite.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/testsuite.py b/testsuite.py
index a521128..cddce68 100644
--- a/testsuite.py
+++ b/testsuite.py
@@ -895,17 +895,17 @@ comment "advanced comment"
<configuration with 14 symbols, main menu prompt "Main menu", srctree is current directory, config symbol prefix "CONFIG_", warnings disabled, printing of warnings to stderr enabled, undef. symbol assignment warnings disabled, redundant symbol assignment warnings enabled>
""")
- os.environ["srctree"] = "srctree value"
+ os.environ["srctree"] = "Kconfiglib"
os.environ["CONFIG_"] = "CONFIG_ value"
- c = Kconfig("Kconfiglib/tests/Krepr", warn=False)
+ c = Kconfig("tests/Krepr", warn=False)
c.enable_warnings()
c.disable_stderr_warnings()
c.disable_redun_warnings()
c.enable_undef_warnings()
verify_repr(c, """
-<configuration with 14 symbols, main menu prompt "Main menu", srctree "srctree value", config symbol prefix "CONFIG_ value", warnings enabled, printing of warnings to stderr disabled, undef. symbol assignment warnings enabled, redundant symbol assignment warnings disabled>
+<configuration with 14 symbols, main menu prompt "Main menu", srctree "Kconfiglib", config symbol prefix "CONFIG_ value", warnings enabled, printing of warnings to stderr disabled, undef. symbol assignment warnings enabled, redundant symbol assignment warnings disabled>
""")
os.environ.pop("srctree", None)
@@ -987,7 +987,7 @@ g
os.environ["srctree"] = srctree
# Has symbol with empty help text, so disable warnings
- c = Kconfig("Kconfiglib/tests/Klocation", warn=False)
+ c = Kconfig("tests/Klocation", warn=False)
verify_locations(c.syms["SINGLE_DEF"].nodes, "tests/Klocation:4")
@@ -1018,7 +1018,7 @@ g
# Test recursive 'source' detection
try:
- Kconfig("Kconfiglib/tests/Krecursive1")
+ Kconfig("tests/Krecursive1")
except KconfigError:
pass
except:
@@ -1030,7 +1030,7 @@ g
# TODO: Make an exception test helper
try:
- Kconfig("Kconfiglib/tests/Kmissingsource")
+ Kconfig("tests/Kmissingsource")
except KconfigError:
pass
except:
@@ -1039,7 +1039,7 @@ g
fail("'source' with missing file did not raise exception")
try:
- Kconfig("Kconfiglib/tests/Kmissingrsource")
+ Kconfig("tests/Kmissingrsource")
except KconfigError:
pass
except:
@@ -1559,7 +1559,7 @@ g
"defconfig_filename gave wrong file with $srctree unset")
os.environ["srctree"] = "Kconfiglib/tests"
- c = Kconfig("Kconfiglib/tests/Kdefconfig_srctree")
+ c = Kconfig("Kdefconfig_srctree")
verify(c.defconfig_filename == "Kconfiglib/tests/sub/defconfig_in_sub",
"defconfig_filename gave wrong file with $srctree set")