This is an archive of the discontinued LLVM Phabricator instance.

[runtimes] Serialize all Lit params instead of passing them to add_lit_testsuite
ClosedPublic

Authored by ldionne on Jul 14 2021, 8:41 AM.

Details

Reviewers
ldionne
Group Reviewers
Restricted Project
Restricted Project
Restricted Project
Commits
rG0c3401c86e82: [runtimes] Serialize all Lit params instead of passing them to add_lit_testsuite
Summary

add_lit_testsuite() takes Lit parameters passed to it and adds them
to the parameters used globally when running all test suites. That
means that a target like check-all, which ends up calling Lit on
the whole monorepo, will see the test parameters for all the individual
project's test suites.

So, for example, it would see --param std=c++03 (from libc++abi), and
--param std=c++03 (from libc++), and --param whatever (from another
project being tested at the same time). While always unclean, that works
when the parameters all agree. However, if the parameters share the same
name but have different values, only one of those two values will be used
and it will be incredibly confusing to understand why one of the test
suites is being run with the incorrect parameter value.

For that reason, this commit moves away from using add_lit_testsuite()'s
PARAM functionality, and serializes the parameter values for the runtimes
in the generated config.py file instead, which is local to the specific
test suite.

Diff Detail

Event Timeline

ldionne created this revision.Jul 14 2021, 8:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 14 2021, 8:41 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne requested review of this revision.Jul 14 2021, 8:41 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 14 2021, 8:41 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne updated this revision to Diff 358705.Jul 14 2021, 12:51 PM

Rebase onto main for CI.

ldionne accepted this revision.Jul 15 2021, 4:52 AM
This revision was not accepted when it landed; it landed in state Needs Review.Jul 15 2021, 4:53 AM
This revision was automatically updated to reflect the committed changes.