77//! tested 1.0 to 1.51. Run this with:
88//!
99//! ```console
10- //! cargo test --test testsuite -- old_cargos --nocapture
10+ //! cargo test --test testsuite -- old_cargos --nocapture --ignored
1111//! ```
1212
1313use cargo:: CargoResult ;
@@ -92,6 +92,16 @@ fn collect_all_toolchains() -> Vec<(Version, String)> {
9292 toolchains
9393}
9494
95+ /// Returns whether the default toolchain is the stable version.
96+ fn default_toolchain_is_stable ( ) -> bool {
97+ let default = tc_process ( "rustc" , "this" ) . arg ( "-V" ) . exec_with_output ( ) ;
98+ let stable = tc_process ( "rustc" , "stable" ) . arg ( "-V" ) . exec_with_output ( ) ;
99+ match ( default, stable) {
100+ ( Ok ( d) , Ok ( s) ) => d. stdout == s. stdout ,
101+ _ => false ,
102+ }
103+ }
104+
95105// This is a test for exercising the behavior of older versions of cargo with
96106// the new feature syntax.
97107//
@@ -102,6 +112,7 @@ fn collect_all_toolchains() -> Vec<(Version, String)> {
102112// The optional dependency `new-baz-dep` should not be activated.
103113// * `bar` 1.0.2 has a dependency on `baz` that *requires* the new feature
104114// syntax.
115+ #[ ignore]
105116#[ cargo_test]
106117fn new_features ( ) {
107118 if std:: process:: Command :: new ( "rustup" ) . output ( ) . is_err ( ) {
@@ -504,6 +515,7 @@ fn new_features() {
504515}
505516
506517#[ cargo_test]
518+ #[ ignore]
507519fn index_cache_rebuild ( ) {
508520 // Checks that the index cache gets rebuilt.
509521 //
@@ -587,7 +599,13 @@ foo v0.1.0 [..]
587599}
588600
589601#[ cargo_test]
602+ #[ ignore]
590603fn avoids_split_debuginfo_collision ( ) {
604+ // Test needs two different toolchains.
605+ // If the default toolchain is stable, then it won't work.
606+ if default_toolchain_is_stable ( ) {
607+ return ;
608+ }
591609 // Checks for a bug where .o files were being incorrectly shared between
592610 // different toolchains using incremental and split-debuginfo on macOS.
593611 let p = project ( )
0 commit comments