Skip to content

Run all workspace tests in CI (x86-64 Linux) #7392

@drinkcat

Description

@drinkcat

In #7383, we noticed that CI is not running all tests. For example, tests for package uucore are not being run.

I believe the right solution is to run the tests with the --workspace flag:

cargo test --workspace

I did some experiments in #7386, where I first tried to add --workspace unconditionally to the cargo test command.

windows/macos/linux-musl builds are broken: we could try to fix this later (I'll probably file other issues).

Even x86_64-unknown-linux-gnu builds are built using cross. First, the selinux dependency was not met. This could be fixed by adding a Cross.toml file that pulls in libselinux1-dev (see this example). But even then, the problem is that ghcr.io/cross-rs/x86_64-unknown-linux-gnu:0.2.5 is ancient (Ubuntu 16.04),
so the provided libclang is too old, and the build fails with:

  A `libclang` function was called that is not supported by the loaded `libclang` instance.

      called function = `clang_getTranslationUnitTargetInfo`
      loaded `libclang` instance = 3.8.x

  The minimum `libclang` requirement for this particular function can be found here:
  https://docs.rs/clang-sys/latest/clang_sys/clang_getTranslationUnitTargetInfo/index.html

  Instructions for installing `libclang` can be found here:
  https://rust-lang.github.io/rust-bindgen/requirements.html

My current idea is to add a new job to the matrix that uses cargo directly (no cross). But that currently fails with:

error[E0658]: lint reasons are experimental
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/selinux-0.5.0/src/errors.rs:144:24
    |
144 |     #[allow(dead_code, reason = "used by unit tests")]
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #54503 <https://github.com/rust-lang/rust/issues/54503> for more information

For more information about this error, try `rustc --explain E0658`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions