Skip to content

tests: record build systems with a plain toolchain - #39

Merged
LalitMaganti merged 1 commit into
mainfrom
conformance-plain-toolchain
Sep 16, 2026
Merged

LalitMaganti merged 1 commit into
mainfrom
conformance-plain-toolchain

Conversation

@LalitMaganti

Copy link
Copy Markdown
Owner

main is red. Installing ccache for the wrapper loop test (#36) put
/usr/lib/ccache in front of cc on the CI runner, since the Ubuntu package
populates that directory and the runner already has it on PATH. The
build-system diff tests inherit the whole environment, so ccache ran as part
of every build and each expectation grew a ccache node and an
as -> ccache [.o] edge.

The expectations describe a plain toolchain, so record with one: take any
launcher directory off PATH for these recordings. Tests that want a
launcher, such as the wrapper loop test, put one there themselves.

Verified on Linux by reproducing the CI condition with /usr/lib64/ccache
first on PATH: make fails before the change and passes after, and the
suite is 43 passed, 3 skipped with it.

The build-system diff tests inherited the whole environment, so a compiler
launcher on PATH ran as part of the build and appeared in the recording. That
was fine until installing ccache for the wrapper loop test put /usr/lib/ccache
in front of cc on the CI runner, and every expectation grew a ccache node.

The expectations describe a plain toolchain, so record with one: take the
launcher directories off PATH. Tests that want a launcher put one there
themselves.
@LalitMaganti
LalitMaganti merged commit 6d5c0a0 into main Sep 16, 2026
10 of 11 checks passed
LalitMaganti added a commit that referenced this pull request Sep 16, 2026
`main` is still red: #39 fixed Make and CMake, which resolve `cc`
through
`PATH`, but not `meson-ninja`.

Meson does not take whatever is in front of the compiler on `PATH`. It
goes
looking for a `ccache` binary itself, finds `/usr/bin/ccache`, and
writes
`/usr/bin/ccache cc` into `build.ninja`, so no amount of `PATH`
filtering
helps. It does leave the compiler alone when it is told which one to
use, so
the fixture now names it.

The fixture also has to apply to the whole test rather than the
recording
alone, since CMake and Meson resolve the compiler when they configure,
which
happens before recording starts, and write the result into their build
files.

Verified on Linux with ccache installed and `/usr/lib64/ccache` first on
`PATH`, which is the CI condition: `meson-ninja` and `cmake-ninja` no
longer
mention ccache at all, and the suite is 43 passed, 2 skipped. The two
are
deselected there only because that machine's gcc drives `as` through
`sh`,
which is a pre-existing difference on Fedora and not seen on Ubuntu.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant