Skip to content

Commit 9064b4c

Browse files
authored
Developer experience - enable all the features when running tests by 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
1 parent d6d2405 commit 9064b4c

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

.cirrus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ test: &TEST
3030
<< : *BUILD
3131
test_script:
3232
- . $HOME/.cargo/env || true
33-
- $TOOL test --target $TARGET --all-features
33+
- $TOOL test --target $TARGET
3434

3535
# Test FreeBSD in a full VM. Test the i686 target too, in the
3636
# same VM. The binary will be built in 32-bit mode, but will execute on a
@@ -59,7 +59,7 @@ task:
5959
- . $HOME/.cargo/env
6060
- cargo build --target i686-unknown-freebsd --all-features
6161
- cargo doc --no-deps --target i686-unknown-freebsd --all-features
62-
- cargo test --target i686-unknown-freebsd --all-features
62+
- cargo test --target i686-unknown-freebsd
6363
i386_feature_script:
6464
- . $HOME/.cargo/env
6565
- if [ -z "$NOHACK" ]; then cargo hack check --each-feature --target i686-unknown-freebsd; fi

.github/actions/test/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ runs:
2929
3030
- name: test
3131
shell: bash
32-
run: ${{ inputs.SUDO }} $(which ${{ inputs.TOOL }}) test --target ${{ inputs.TARGET }} --all-features
32+
run: ${{ inputs.SUDO }} $(which ${{ inputs.TOOL }}) test --target ${{ inputs.TARGET }}

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ And having multiple change logs for one PR is allowed.
9191

9292
## Testing
9393

94-
nix has a test suite that you can run with `cargo test --all-features`. Ideally, we'd like pull
94+
nix has a test suite that you can run with `cargo test`. Ideally, we'd like pull
9595
requests to include tests where they make sense. For example, when fixing a bug,
9696
add a test that would have failed without the fix.
9797

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ parking_lot = "0.12"
7777
rand = "0.8"
7878
tempfile = "3.7.1"
7979
semver = "1.0.7"
80+
nix = { path = ".", features = ["acct", "aio", "dir", "env", "event", "fanotify",
81+
"feature", "fs", "hostname", "inotify", "ioctl", "kmod", "mman", "mount", "mqueue",
82+
"net", "personality", "poll", "pthread", "ptrace", "quota", "process", "reboot",
83+
"resource", "sched", "signal", "socket", "term", "time", "ucontext", "uio",
84+
"user", "zerocopy"] }
8085

8186
[target.'cfg(any(target_os = "android", target_os = "linux"))'.dev-dependencies]
8287
caps = "0.5.3"

0 commit comments

Comments
 (0)