From 06d28ebe4d48091b316408f396bc8d5a27eb4b3b Mon Sep 17 00:00:00 2001 From: Eh2406 Date: Thu, 2 Aug 2018 15:14:53 -0400 Subject: [PATCH 1/7] try running tests with minimal-versions on CI --- .travis.yml | 2 +- appveyor.yml | 2 +- src/cargo/lib.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9a9c160c45a..a2db16fbb8a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,7 @@ matrix: - rustup toolchain install nightly - cargo +nightly generate-lockfile -Z minimal-versions - cargo -V - - cargo check --tests + - cargo test - env: TARGET=x86_64-unknown-linux-gnu ALT=i686-unknown-linux-gnu diff --git a/appveyor.yml b/appveyor.yml index 170b7ca1d0f..b5a97108747 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -23,5 +23,5 @@ clone_depth: 1 build: false test_script: - - if defined MINIMAL_VERSIONS cargo +nightly generate-lockfile -Z minimal-versions && cargo +stable check --tests + - if defined MINIMAL_VERSIONS cargo +nightly generate-lockfile -Z minimal-versions && cargo +stable test - if NOT defined MINIMAL_VERSIONS cargo test diff --git a/src/cargo/lib.rs b/src/cargo/lib.rs index 36f64c949cb..343f0984e1c 100644 --- a/src/cargo/lib.rs +++ b/src/cargo/lib.rs @@ -4,8 +4,8 @@ #![cfg_attr(feature = "cargo-clippy", allow(boxed_local))] // bug rust-lang-nursery/rust-clippy#1123 #![cfg_attr(feature = "cargo-clippy", allow(cyclomatic_complexity))] // large project #![cfg_attr(feature = "cargo-clippy", allow(derive_hash_xor_eq))] // there's an intentional incoherence -#![cfg_attr(feature = "cargo-clippy", allow(explicit_into_iter_loop))] // (unclear why) -#![cfg_attr(feature = "cargo-clippy", allow(explicit_iter_loop))] // (unclear why) +#![cfg_attr(feature = "cargo-clippy", allow(explicit_into_iter_loop))] // explicit loops are clearer +#![cfg_attr(feature = "cargo-clippy", allow(explicit_iter_loop))] // explicit loops are clearer #![cfg_attr(feature = "cargo-clippy", allow(identity_op))] // used for vertical alignment #![cfg_attr(feature = "cargo-clippy", allow(implicit_hasher))] // large project #![cfg_attr(feature = "cargo-clippy", allow(large_enum_variant))] // large project From 1eaae612898ee1283f71ab76d5fe728f03406633 Mon Sep 17 00:00:00 2001 From: Eh2406 Date: Thu, 2 Aug 2018 16:15:11 -0400 Subject: [PATCH 2/7] get `features_are_quoted` working with minimal-versions on CI --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 0fe5da51370..a208c4852f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,7 @@ serde = "1.0" serde_derive = "1.0" serde_ignored = "0.0.4" serde_json = "1.0" -shell-escape = "0.1" +shell-escape = "0.1.4" tar = { version = "0.4.15", default-features = false } tempfile = "3.0" termcolor = "1.0" From c4d565fc8f840aa4ba5b296007418d48e60b31a5 Mon Sep 17 00:00:00 2001 From: Jacob Finkelman Date: Thu, 2 Aug 2018 20:05:46 -0400 Subject: [PATCH 3/7] Try serde_json --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index a208c4852f7..609d8b949e9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,7 @@ semver = { version = "0.9.0", features = ["serde"] } serde = "1.0" serde_derive = "1.0" serde_ignored = "0.0.4" -serde_json = "1.0" +serde_json = "1.0.24" shell-escape = "0.1.4" tar = { version = "0.4.15", default-features = false } tempfile = "3.0" From e969b10e3e638ab20ba86e118cd1475494e7cd4b Mon Sep 17 00:00:00 2001 From: Eh2406 Date: Tue, 14 Aug 2018 17:13:41 -0400 Subject: [PATCH 4/7] fix short_message_format vs nightly --- tests/testsuite/check.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/testsuite/check.rs b/tests/testsuite/check.rs index c847ff42e22..1468b012751 100644 --- a/tests/testsuite/check.rs +++ b/tests/testsuite/check.rs @@ -724,6 +724,10 @@ fn check_artifacts() { #[test] fn short_message_format() { + if !is_nightly() { + // This can be removed once 1.30 is stable (rustdoc --error-format stabilized). + return; + } let foo = project() .file("src/lib.rs", "fn foo() { let _x: bool = 'a'; }") .build(); From 61d95ec3200b1bfa4f0958c3d32a7afafac71a90 Mon Sep 17 00:00:00 2001 From: Eh2406 Date: Tue, 14 Aug 2018 17:16:41 -0400 Subject: [PATCH 5/7] DISABLE_CROSS_TESTS for minimal-versions --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index b5a97108747..76f4a0e2c2d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,6 +7,7 @@ environment: OTHER_TARGET: i686-pc-windows-msvc MAKE_TARGETS: test-unit-x86_64-pc-windows-msvc MINIMAL_VERSIONS: true + CFG_DISABLE_CROSS_TESTS: 1 install: - appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe From 637e606b72ae025fe746a2a8e1793a1f586cef68 Mon Sep 17 00:00:00 2001 From: Eh2406 Date: Wed, 15 Aug 2018 10:08:39 -0400 Subject: [PATCH 6/7] bump min rust, and remove nightly check --- .travis.yml | 2 +- tests/testsuite/check.rs | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index a2db16fbb8a..9b33568e52c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ matrix: # increased every 6 weeks or so when the first PR to use a new feature. - env: TARGET=x86_64-unknown-linux-gnu ALT=i686-unknown-linux-gnu - rust: 1.27.2 + rust: 1.28.0 script: - rustup toolchain install nightly - cargo +nightly generate-lockfile -Z minimal-versions diff --git a/tests/testsuite/check.rs b/tests/testsuite/check.rs index 1468b012751..c847ff42e22 100644 --- a/tests/testsuite/check.rs +++ b/tests/testsuite/check.rs @@ -724,10 +724,6 @@ fn check_artifacts() { #[test] fn short_message_format() { - if !is_nightly() { - // This can be removed once 1.30 is stable (rustdoc --error-format stabilized). - return; - } let foo = project() .file("src/lib.rs", "fn foo() { let _x: bool = 'a'; }") .build(); From 620d5cc9cfe0d3ebe14450bafc140ce388b608fc Mon Sep 17 00:00:00 2001 From: Eh2406 Date: Wed, 15 Aug 2018 12:09:44 -0400 Subject: [PATCH 7/7] stop test on appveyor as requested --- appveyor.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 76f4a0e2c2d..c76612bbabe 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,5 +24,8 @@ clone_depth: 1 build: false test_script: - - if defined MINIMAL_VERSIONS cargo +nightly generate-lockfile -Z minimal-versions && cargo +stable test + # 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 +stable check --tests - if NOT defined MINIMAL_VERSIONS cargo test