Skip to content

Install FileCheck for older (apt-based) distros #770

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 24, 2023

Conversation

kkysen
Copy link
Contributor

@kkysen kkysen commented Jan 9, 2023

This installs FileCheck for older (apt-based) distros so that we can use FileCheck in testing without having to disable it anywhere. Notably, we can use FileCheck for c2rust-analyze tests.

These older distros/default LLVM versions require the llvm-${major}-tools or llvm-${major}.${minor}-tools packages, while newer ones install FileCheck automatically, so this adds the installation of the older versions if FileCheck is not found in the expected location, $(llvm-config --bindir)/FileCheck, using the same llvm-config resolution used elsewhere.

This changes the docker builds, so we'll need a ./scripts/docker_build.sh push-all.

This also adds an array of packages in the script, which makes adding to it easier, as well as allowing for inline comments (which don't work with \ line continuation).

@aneksteind aneksteind requested a review from thedataking January 9, 2023 16:33
@aneksteind
Copy link
Contributor

tagging @thedataking for push-all

Copy link
Contributor

@thedataking thedataking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to know if dropping LLVM 6 support would simplify the provisioning change you are proposing.

These older distros/default LLVM versions require
the `llvm-${major}-tools` or `llvm-${major}.${minor}-tools` packages,
while newer ones install `FileCheck` automatically.
@kkysen kkysen force-pushed the kkysen/install-filecheck branch from 9196d73 to 1e80811 Compare January 14, 2023 10:15
kkysen added a commit that referenced this pull request Jan 14, 2023
It used to be there as the script ran in CI, but it no longer is,
so we don't need to retry anymore.
See #770 (comment).
kkysen added a commit that referenced this pull request Jan 18, 2023
It used to be there as the script ran in CI, but it no longer is,
so we don't need to retry anymore.
See #770 (comment).
thedataking pushed a commit that referenced this pull request Jan 19, 2023
It used to be there as the script ran in CI, but it no longer is,
so we don't need to retry anymore.
See #770 (comment).
@kkysen
Copy link
Contributor Author

kkysen commented Jan 24, 2023

@thedataking said it looks better, so I'll merge now.

@kkysen kkysen merged commit ba1ee62 into master Jan 24, 2023
@kkysen kkysen deleted the kkysen/install-filecheck branch January 24, 2023 00:12
kkysen added a commit that referenced this pull request Jan 26, 2023
…-config`) (#797)

Use a separate `apt-get install` for installing `FileCheck`, as the
detection needs `llvm-config`, which needs `llvm` to be installed first.

This fixes a bug from #770.
kkysen added a commit that referenced this pull request Jan 26, 2023
- Fixes #608.

Depends on:
- #770
- #799

Once #770 lands, `FileCheck` will be installed everywhere, so we can
finally re-enable the `c2rust-analyze` tests, which use `FileCheck`, in
CI. This is getting increasingly important as we more rapidly work on
`c2rust-analyze`.
bytewife pushed a commit to bytewife/c2rust that referenced this pull request Jan 26, 2023
It used to be there as the script ran in CI, but it no longer is,
so we don't need to retry anymore.
See immunant#770 (comment).
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.

cargo test -p c2rust-analyze fails CI due to no FileCheck
3 participants