Skip to content

Allow testsuite warnings in dev #6426

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

Merged
merged 1 commit into from
Dec 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ matrix:
- rustup toolchain install nightly
- cargo +nightly generate-lockfile -Z minimal-versions
- cargo -V
- cargo test
- cargo test --features=deny-warnings
if: branch != master OR type = pull_request

- env: TARGET=x86_64-unknown-linux-gnu
Expand All @@ -50,7 +50,7 @@ matrix:
install:
- mdbook --help || cargo install mdbook --force
script:
- cargo test
- cargo test --features=deny-warnings
- cargo doc --no-deps
- (cd src/doc && mdbook build --dest-dir ../../target/doc)
if: branch != master OR type = pull_request
Expand All @@ -61,7 +61,7 @@ matrix:
before_script:
- rustup target add $ALT
script:
- cargo test
- cargo test --features=deny-warnings

notifications:
email:
Expand Down
4 changes: 0 additions & 4 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,6 @@ and run with `rustup run` (e.g `rustup run nightly
<path-to-cargo>/target/debug/cargo <args>..`) (or set the `RUSTC` env var to point
to nightly rustc).

Because the test suite has `#![deny(warnings)]` at times you might find it
convenient to override this with `RUSTFLAGS`, for example
`RUSTFLAGS="--cap-lints warn" cargo build`.

## Logging

Cargo uses [`env_logger`](https://docs.rs/env_logger/*/env_logger/), so you can set
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,6 @@ test = false
doc = false

[features]
deny-warnings = []
vendored-openssl = ['openssl/vendored']
pretty-env-logger = ['pretty_env_logger']
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ test_script:
# we don't have ci time to run the full `cargo test` with `minimal-versions` like
# - if defined MINIMAL_VERSIONS cargo +nightly generate-lockfile -Z minimal-versions && cargo +stable test
# so we just run `cargo check --tests` like
- if defined MINIMAL_VERSIONS cargo +nightly generate-lockfile -Z minimal-versions && cargo +1.31.0 check --tests
- if NOT defined MINIMAL_VERSIONS cargo test
- if defined MINIMAL_VERSIONS cargo +nightly generate-lockfile -Z minimal-versions && cargo +1.31.0 check --tests --features=deny-warnings
- if NOT defined MINIMAL_VERSIONS cargo test --features=deny-warnings
2 changes: 1 addition & 1 deletion tests/testsuite/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![warn(rust_2018_idioms)] // while we're getting used to 2018
#![deny(warnings)]
#![cfg_attr(feature="deny-warnings", deny(warnings))]
#![cfg_attr(feature = "cargo-clippy", allow(blacklisted_name))]
#![cfg_attr(feature = "cargo-clippy", allow(explicit_iter_loop))]

Expand Down