
From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Check that configuration fragments provided to buildman as comma- separated list are passed on to the make command of the builder. In the %_defconfig: target of scripts/kconfig/Makefile the defconfig file and the fragments are combined via the gcc preprocessor. Modeling this step in the buildman testbench without invoking the actual Makefile would not provide better test coverage. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> --- tools/buildman/func_test.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index 51c6855420e..7e837fe075e 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -798,6 +798,21 @@ Some images are invalid''' lines = self.check_command('-L')[0] self.assertIn(b'NO_LTO=1', lines[0]) + def testFragments(self): + """Test passing of configuration fragments to the make command""" + # Single fragment passed as argument + extra_args = ['board0', '--fragments', 'f1.config'] + lines, cfg_data = self.check_command(*extra_args) + self.assertRegex(lines[0].decode('utf-8'), + r'make O=/.*board0_defconfig\s+f1\.config', + 'Test single fragment') + # Multiple fragments passed as comma-separated list + extra_args = ['board0', '--fragments', 'f1.config,f2.config'] + lines, cfg_data = self.check_command(*extra_args) + self.assertRegex(lines[0].decode('utf-8'), + r'make O=/.*board0_defconfig\s+f1\.config\s+f2\.config', + 'Test multiple fragments') + def testReproducible(self): """Test that the -r flag works""" lines, cfg_data = self.check_command('-r') -- 2.43.0