buildman: Fix flaky test_kconfig_change test
When CI has fewer CPUs than boards, one thread may process multiple boards. The .config from the first board persists in the thread's work directory, causing kconfig_changed_since() to return True for the next board's first commit, triggering an extra reconfig. Fix by forcing -T4 to ensure each board gets its own thread with an isolated work directory. Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
@@ -1285,10 +1285,13 @@ something: me
|
|||||||
config_exists[0] = True
|
config_exists[0] = True
|
||||||
return exists
|
return exists
|
||||||
|
|
||||||
# Run buildman with kconfig checking enabled
|
# Run buildman with kconfig checking enabled. Use -T4 to ensure each
|
||||||
|
# board gets its own thread, avoiding .config leaking between boards
|
||||||
|
# when a thread processes multiple boards (which happens with <4 CPUs)
|
||||||
with mock.patch.object(builderthread, 'kconfig_changed_since',
|
with mock.patch.object(builderthread, 'kconfig_changed_since',
|
||||||
mock_kconfig_changed):
|
mock_kconfig_changed):
|
||||||
self._RunControl('-b', TEST_BRANCH, '-c2', '-o', self._output_dir)
|
self._RunControl('-b', TEST_BRANCH, '-c2', '-o', self._output_dir,
|
||||||
|
'-T4')
|
||||||
|
|
||||||
# Verify kconfig_changed_since was called
|
# Verify kconfig_changed_since was called
|
||||||
self.assertGreater(call_count[0], 0)
|
self.assertGreater(call_count[0], 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user