1 mod permute; 2 mod task; 3 main()4fn main() { 5 let features = ["termcolor", "humantime", "atty", "regex"]; 6 7 // Run a default build 8 if !task::test(Default::default()) { 9 panic!("default test execution failed"); 10 } 11 12 // Run a build with no features 13 if !task::test(task::TestArgs { 14 default_features: false, 15 ..Default::default() 16 }) { 17 panic!("default test execution failed"); 18 } 19 20 // Run a set of permutations 21 let failed = permute::all(&features) 22 .into_iter() 23 .filter(|features| { 24 !task::test(task::TestArgs { 25 features: features.clone(), 26 default_features: false, 27 lib_only: true, 28 }) 29 }) 30 .collect::<Vec<_>>(); 31 32 if !failed.is_empty() { 33 for failed in failed { 34 eprintln!("FAIL: {:?}", failed); 35 } 36 37 panic!("test execution failed"); 38 } else { 39 println!("test execution succeeded"); 40 } 41 } 42