summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xalldefconfig.py17
-rw-r--r--testsuite.py31
2 files changed, 34 insertions, 14 deletions
diff --git a/alldefconfig.py b/alldefconfig.py
new file mode 100755
index 0000000..fb8075c
--- /dev/null
+++ b/alldefconfig.py
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+
+# Works like 'make alldefconfig'. Verified by the test suite to generate
+# identical output to 'make alldefconfig' for all ARCHes.
+#
+# Usage for the Linux kernel:
+#
+# $ make [ARCH=<arch>] scriptconfig SCRIPT=Kconfiglib/alldefconfig.py
+
+import kconfiglib
+
+def main():
+ kconfiglib.standard_kconfig().write_config(
+ kconfiglib.standard_config_filename())
+
+if __name__ == "__main__":
+ main()
diff --git a/testsuite.py b/testsuite.py
index b18b7cf..b5644d2 100644
--- a/testsuite.py
+++ b/testsuite.py
@@ -1923,9 +1923,9 @@ def run_compatibility_tests():
# be enabled once patches get in.
#test_min_config,
test_sanity,
- test_all_no,
- test_all_no_walk,
- test_all_yes)
+ test_allnoconfig,
+ test_allnoconfig_walk,
+ test_allyesconfig)
for test_fn in test_fns:
# The test description is taken from the docstring of the corresponding
@@ -1966,11 +1966,11 @@ def all_arch_srcarch_kconfigs():
os.environ["SRCARCH"] = srcarch
yield (Kconfig(), arch, srcarch)
-def test_all_no(conf, arch, srcarch):
+def test_allnoconfig(conf, arch, srcarch):
"""
- Verify that allnoconfig.py generates the same .config as 'make
- allnoconfig', for each architecture. Runs the script via 'make
- scriptconfig', so kinda slow even in speedy mode.
+ Verify that allnoconfig.py generates the same .config as
+ 'make allnoconfig', for each architecture. Runs the script via
+ 'make scriptconfig', so kinda slow even in speedy mode.
"""
# TODO: Support speedy mode for running the script
shell("make scriptconfig SCRIPT=Kconfiglib/allnoconfig.py "
@@ -1983,7 +1983,7 @@ def test_all_no(conf, arch, srcarch):
compare_configs(arch)
-def test_all_no_walk(conf, arch, srcarch):
+def test_allnoconfig_walk(conf, arch, srcarch):
"""
Verify that examples/allnoconfig_walk.py generates the same .config as
'make allnoconfig', for each architecture. Runs the script via 'make
@@ -2000,11 +2000,11 @@ def test_all_no_walk(conf, arch, srcarch):
compare_configs(arch)
-def test_all_yes(conf, arch, srcarch):
+def test_allyesconfig(conf, arch, srcarch):
"""
Verify that allyesconfig.py generates the same .config as
- 'make allyesconfig', for each architecture. Runs the script via 'make
- scriptconfig', so kinda slow even in speedy mode.
+ 'make allyesconfig', for each architecture. Runs the script via
+ 'make scriptconfig', so kinda slow even in speedy mode.
"""
# TODO: Support speedy mode for running the script
shell("make scriptconfig SCRIPT=Kconfiglib/allyesconfig.py "
@@ -2161,10 +2161,13 @@ def test_sanity(conf, arch, srcarch):
def test_alldefconfig(conf, arch, srcarch):
"""
- Verify that Kconfiglib generates the same .config as 'make alldefconfig',
- for each architecture
+ Verify that alldefconfig.py generates the same .config as
+ 'make alldefconfig', for each architecture. Runs the script via
+ 'make scriptconfig', so kinda slow even in speedy mode.
"""
- conf.write_config("._config")
+ shell("make scriptconfig SCRIPT=Kconfiglib/alldefconfig.py "
+ "PYTHONCMD='{}'".format(sys.executable))
+ shell("mv .config ._config")
if speedy:
shell("scripts/kconfig/conf --alldefconfig Kconfig")
else: