Skip to content

Run all workspace tests in CI (MacOS) #7396

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

Open
drinkcat opened this issue Mar 4, 2025 · 4 comments
Open

Run all workspace tests in CI (MacOS) #7396

drinkcat opened this issue Mar 4, 2025 · 4 comments

Comments

@drinkcat
Copy link
Contributor

drinkcat commented Mar 4, 2025

Similar to #7392, it would be nice to run all tests in CI, on MacOS (basically adding workspace-tests: true to both macos jobs in the matrix).

When I tried in #7386, I hit this issue:

error: couldn't read /Users/runner/work/coreutils/coreutils/target/aarch64-apple-darwin/debug/build/fts-sys-bdca82aeb17ec986/out/fts-sys.rs: No such file or directory (os error 2)
  --> /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fts-sys-0.2.14/src/lib.rs:24:1
   |
24 | include!(concat!(env!("OUT_DIR"), "/fts-sys.rs"));
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `include` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `fts-sys` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
Error: Process completed with exit code 101.

It's a bit unfortunate that fts-sys gets pulled. I think it's only required by chcon (selinux), which makes no sense on MacOS. But I'm not sure if there's a way around this.

I think the easiest will be to patch fts-sys to generate an empty crate on non-supported platforms: https://codeberg.org/koutheir/fts-sys/issues/3

There might be more issues after that one gets fixed.

@drinkcat
Copy link
Contributor Author

fts-sys issue should be fixed upstream: need to wait for #7420.

@sylvestre
Copy link
Contributor

it is blocked on #7423 which is blocked on
termux/termux-packages#23469

@drinkcat
Copy link
Contributor Author

That part is unblocked, let's see if anything else fails: #7576 .

@drinkcat
Copy link
Contributor Author

https://github.com/uutils/coreutils/actions/runs/14060026185/job/39371268061?pr=7576

cargo +1.85.0 test --target=x86_64-apple-darwin  --workspace  --features=feat_os_macos
...
   Compiling uu_runcon v0.0.30 (/Users/runner/work/coreutils/coreutils/src/uu/runcon)
warning: ignoring -C extra-filename flag due to -o flag

error[E0432]: unresolved imports `selinux::OpaqueSecurityContext`, `selinux::SecurityClass`, `selinux::SecurityContext`
  --> src/uu/runcon/src/runcon.rs:11:15
   |
11 | use selinux::{OpaqueSecurityContext, SecurityClass, SecurityContext};

The fails because --workspace tries to run tests in all packages, and src/uu/runcon is one of them (and the selinux crate is empty on non-Linux platforms).

Not sure how to make progress on this, I'll do a couple of experiments, but nothing I can come up with now seems really appealing.

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

No branches or pull requests

2 participants