From 517c2f79b70bce21846b0ebfaa242fc74adba03b Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Mon, 8 Feb 2016 13:35:26 -0800 Subject: [PATCH] chore(cargo): Only depend on clippy when testing --- .travis.yml | 6 ++++-- serde/Cargo.toml | 2 +- serde_codegen/Cargo.toml | 3 ++- serde_macros/Cargo.toml | 13 ++++++++++++- serde_tests/Cargo.toml | 2 +- 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 636d4faa..9cd70d80 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,9 +22,11 @@ script: - | (cd serde && travis-cargo build) && (cd serde && travis-cargo test) && + (cd serde && travis-cargo --only nightly test -- --features nightly-testing) && (cd serde_tests && travis-cargo test) && - (cd serde_macros && travis-cargo --only nightly test) && - (cd serde_macros && travis-cargo --only nightly bench) && + (cd serde_tests && travis-cargo --only nightly test -- --features nightly-testing) && + (cd serde_macros && travis-cargo --only nightly test -- --features nightly-testing) && + (cd serde_macros && travis-cargo --only nightly bench -- --features nightly-testing) && (cd serde && travis-cargo --only stable doc) && (cd serde_codegen && travis-cargo --only stable doc) diff --git a/serde/Cargo.toml b/serde/Cargo.toml index 2c2cef80..c4fb239f 100644 --- a/serde/Cargo.toml +++ b/serde/Cargo.toml @@ -10,7 +10,7 @@ readme = "../README.md" keywords = ["serde", "serialization"] [features] -nightly = ["clippy"] +nightly-testing = ["clippy"] num-bigint = ["num/bigint"] num-complex = ["num/complex"] num-impls = ["num-bigint", "num-complex", "num-rational"] diff --git a/serde_codegen/Cargo.toml b/serde_codegen/Cargo.toml index ac438582..8cd05f5e 100644 --- a/serde_codegen/Cargo.toml +++ b/serde_codegen/Cargo.toml @@ -11,7 +11,8 @@ keywords = ["serde", "serialization"] [features] default = ["with-syntex"] -nightly = ["clippy", "quasi_macros"] +nightly = ["quasi_macros"] +nightly-testing = ["clippy"] with-syntex = ["quasi/with-syntex", "quasi_codegen", "quasi_codegen/with-syntex", "syntex", "syntex_syntax"] [build-dependencies] diff --git a/serde_macros/Cargo.toml b/serde_macros/Cargo.toml index a0333cb3..d4a57b68 100644 --- a/serde_macros/Cargo.toml +++ b/serde_macros/Cargo.toml @@ -12,6 +12,9 @@ keywords = ["serde", "serialization"] name = "serde_macros" plugin = true +[features] +nightly-testing = ["clippy", "serde/nightly-testing", "serde_codegen/nightly-testing"] + [dependencies] clippy = { version = "^0.0.37", optional = true } serde_codegen = { version = "^0.6.10", path = "../serde_codegen", default-features = false, features = ["nightly"] } @@ -20,4 +23,12 @@ serde_codegen = { version = "^0.6.10", path = "../serde_codegen", default-featur compiletest_rs = "^0.0.11" num = "^0.1.27" rustc-serialize = "^0.3.16" -serde = { version = "^0.6.10", path = "../serde", features = ["nightly", "num-impls"] } +serde = { version = "^0.6.10", path = "../serde", features = ["num-impls"] } + +[[test]] +name = "test" +path = "tests/test.rs" + +[[bench]] +name = "bench" +path = "benches/bench.rs" diff --git a/serde_tests/Cargo.toml b/serde_tests/Cargo.toml index dc5b5421..4a64b152 100644 --- a/serde_tests/Cargo.toml +++ b/serde_tests/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["serialization"] build = "build.rs" [features] -nightly = ["clippy", "serde/nightly"] +nightly-testing = ["clippy", "serde/nightly-testing", "serde_codegen/nightly-testing"] [build-dependencies] syntex = { version = "^0.26.0" }