From 883ae46e8a120d6dda03a4a56a544ab79cf20b3b Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Tue, 11 Dec 2012 05:35:46 +0100 Subject: Include allnoconfig_simpler.py in test suite. Also update some comments to reflect optimizations. --- examples/allnoconfig_simpler.py | 10 +++++----- kconfigtest.py | 28 ++++++++++++++++++++++------ 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/examples/allnoconfig_simpler.py b/examples/allnoconfig_simpler.py index b80e79a..4846a7f 100644 --- a/examples/allnoconfig_simpler.py +++ b/examples/allnoconfig_simpler.py @@ -5,11 +5,11 @@ # get truncated downwards or upwards as determined by the visibility and # selects. -# Note: This version will be very slow since Kconfiglib invalidates all -# dependent symbols for each set_value() call. This does not happen for -# load_config(), which instead invalidates all symbols once after the -# configuration has been loaded. This is OK for load_config() since nearly all -# symbols will tend to be affected anyway. +# This version is a bit slower compared allnoconfig.py since Kconfiglib +# invalidates all dependent symbols for each set_value() call. This does not +# happen for load_config(), which instead invalidates all symbols once after +# the configuration has been loaded. This is OK for load_config() since nearly +# all symbols will tend to be affected anyway. import kconfiglib import sys diff --git a/kconfigtest.py b/kconfigtest.py index ffbf7c5..8635fdc 100644 --- a/kconfigtest.py +++ b/kconfigtest.py @@ -482,13 +482,14 @@ def run_compatibility_tests(): # tree -- currently, all tests. The boolean flag indicates whether .config # (generated by the C implementation) should be compared to ._config # (generated by us) after each invocation. - all_arch_tests = [(test_config_absent, True), - (test_all_no, True), - (test_all_yes, True), - (test_call_all, False), + all_arch_tests = [(test_config_absent, True), + (test_call_all, False), + (test_all_no, True), + (test_all_yes, True), + (test_all_no_simpler, True), # Needs to report success/failure for each arch/defconfig # combo, hence False. - (test_defconfig, False)] + (test_defconfig, False)] print "Loading Config instances for all architectures..." arch_configs = get_arch_configs() @@ -592,6 +593,21 @@ def test_all_no(conf): else: shell("make allnoconfig") +def test_all_no_simpler(conf): + """ + Test if our examples/allnoconfig_simpler.py script generates the same + .config as 'make allnoconfig' for each architecture. Runs the script via + 'make scriptconfig' and needs to reparse the configurations, so kinda slow + even in speedy mode.""" + + # TODO: Support speedy mode for running the script + shell("make scriptconfig SCRIPT=Kconfiglib/examples/allnoconfig_simpler.py") + shell("mv .config ._config") + if speedy_mode: + shell("scripts/kconfig/conf --allnoconfig Kconfig") + else: + shell("make allnoconfig") + def test_all_yes(conf): """ Test if our examples/allyesconfig.py script generates the same .config as @@ -753,7 +769,7 @@ def test_defconfig(conf): Test if kconfiglib generates the same .config as scripts/kconfig/conf for each architecture/defconfig pair. In obsessive mode, this test includes nonsensical groupings of arches with defconfigs from other arches (every - arch/defconfig combination) and takes hours to run. + arch/defconfig combination) and an order of magnitude longer time to run. This test appends any failures to a file test_defconfig_fails in the root.""" -- cgit v1.2.3