Bug 12323 - automake does not support buildtest-TESTS in parallel mode
Summary: automake does not support buildtest-TESTS in parallel mode
Status: RESOLVED OBSOLETE
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.4.1
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 5.99
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-11-08 18:40 UTC by Juro Bystricky
Modified: 2026-01-15 16:29 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juro Bystricky 2017-11-08 18:40:00 UTC
Automake in oe-core is patched with http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/automake/automake/buildtest.patch

where we basically split "make check" into:

make buildtest-TESTS
make runtest-TESTS

We do this in order to build the tests separately (cross-compile them) but
run them later on the target as part of the "ptest" package.

There are two problems with the existing patch:

1. The patch only creates the targets buildtest-TESTS, runtest-TESTS for "serial-test-harness" (https://www.gnu.org/software/automake/manual/html_node/Serial-Test-Harness.html) . This harness is deprecated, and utils default to "parallel-tests". So in order to be able to use buildtest-TESTS target we currently need to patch configure.ac to explicitly select "serial-tests", something like:

AM_INIT_AUTOMAKE(... [serial-tests] ...)

2. The created targets (builtest-TESTS, runtest-TESTS) are not recursive, in spite of what the patch suggests. This may have worked at some time, but it does not seem to work now.  We need to patch configure.ac with an additional patch, something like:

AM_EXTRA_RECURSIVE_TARGETS([buildtest-TESTS])

otherwise not all tests may end up being cross-compiled.
Comment 1 Randy MacLeod 2023-10-24 14:24:40 UTC
Bulk move from 4.99 or 0.00 to 5.99
Comment 2 Ross Burton 2026-01-15 16:29:04 UTC
Closing this, the design of the test harness in automake isn't broken and isn't the problem. Our horrible ways of building and extracting the tests is the problem and is often broken, but this is all worked around in each recipe.

We need to improve how we build and install tests but that's sort of a larger problem.