Skip to content

Commit

Permalink
Developer experience - enable all the features when running tests by …
Browse files Browse the repository at this point in the history
…default (#2516)

* Explicitly enable all the featuers as far as rust-analyzer is concerned

* Revert "Updated CONTRIBUTING.md with correct test command (#2150)"

This reverts commit ae9b092.

* .github: remove --all-features from tests
  • Loading branch information
pacak authored Sep 27, 2024
1 parent d6d2405 commit 9064b4c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 9064b4c

Please sign in to comment.