From 7d316888a67598ff344a38dd0df51ebdefb86a7b Mon Sep 17 00:00:00 2001 From: Michael Baikov Date: Mon, 23 Sep 2024 20:32:20 -0400 Subject: [PATCH 1/3] Explicitly enable all the featuers as far as rust-analyzer is concerned --- Cargo.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 3166649ee7..98894a57bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -77,6 +77,11 @@ parking_lot = "0.12" rand = "0.8" tempfile = "3.7.1" semver = "1.0.7" +nix = { path = ".", features = ["acct", "aio", "dir", "env", "event", "fanotify", + "feature", "fs", "hostname", "inotify", "ioctl", "kmod", "mman", "mount", "mqueue", + "net", "personality", "poll", "pthread", "ptrace", "quota", "process", "reboot", + "resource", "sched", "signal", "socket", "term", "time", "ucontext", "uio", + "user", "zerocopy"] } [target.'cfg(any(target_os = "android", target_os = "linux"))'.dev-dependencies] caps = "0.5.3" From 3ff73541d320a2f4ce474a3e5a5e85319de51d20 Mon Sep 17 00:00:00 2001 From: Michael Baikov Date: Mon, 23 Sep 2024 20:45:55 -0400 Subject: [PATCH 2/3] Revert "Updated CONTRIBUTING.md with correct test command (#2150)" This reverts commit ae9b09284357eb33536eba7cdca34e8a3ea1bf93. --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 45c6108213..9dc6100ce5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -91,7 +91,7 @@ And having multiple change logs for one PR is allowed. ## Testing -nix has a test suite that you can run with `cargo test --all-features`. Ideally, we'd like pull +nix has a test suite that you can run with `cargo test`. Ideally, we'd like pull requests to include tests where they make sense. For example, when fixing a bug, add a test that would have failed without the fix. From 0b9dfcd4dc1d806f95d6cd1108628af725bf277f Mon Sep 17 00:00:00 2001 From: Michael Baikov Date: Tue, 24 Sep 2024 06:28:26 -0400 Subject: [PATCH 3/3] .github: remove --all-features from tests --- .cirrus.yml | 4 ++-- .github/actions/test/action.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 69126a13ef..69012b576f 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -30,7 +30,7 @@ test: &TEST << : *BUILD test_script: - . $HOME/.cargo/env || true - - $TOOL test --target $TARGET --all-features + - $TOOL test --target $TARGET # Test FreeBSD in a full VM. Test the i686 target too, in the # same VM. The binary will be built in 32-bit mode, but will execute on a @@ -59,7 +59,7 @@ task: - . $HOME/.cargo/env - cargo build --target i686-unknown-freebsd --all-features - cargo doc --no-deps --target i686-unknown-freebsd --all-features - - cargo test --target i686-unknown-freebsd --all-features + - cargo test --target i686-unknown-freebsd i386_feature_script: - . $HOME/.cargo/env - if [ -z "$NOHACK" ]; then cargo hack check --each-feature --target i686-unknown-freebsd; fi diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index e4b7ea455f..31a6fd7aa6 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -29,4 +29,4 @@ runs: - name: test shell: bash - run: ${{ inputs.SUDO }} $(which ${{ inputs.TOOL }}) test --target ${{ inputs.TARGET }} --all-features + run: ${{ inputs.SUDO }} $(which ${{ inputs.TOOL }}) test --target ${{ inputs.TARGET }}