mirror of
				https://github.com/rust-lang/cargo.git
				synced 2025-11-03 13:12:53 +00:00 
			
		
		
		
	test(cfg): parse rustc --print=split-debuginfo
				
					
				
			This commit is contained in:
		
							parent
							
								
									30fe923ca2
								
							
						
					
					
						commit
						036ed3a2dd
					
				@ -356,6 +356,22 @@ fn bad_cfg_discovery() {
 | 
				
			|||||||
                    return;
 | 
					                    return;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                println!("{}", sysroot);
 | 
					                println!("{}", sysroot);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                if mode == "no-split-debuginfo" {
 | 
				
			||||||
 | 
					                    return;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                loop {
 | 
				
			||||||
 | 
					                    let line = lines.next().unwrap();
 | 
				
			||||||
 | 
					                    if line == "___" {
 | 
				
			||||||
 | 
					                        println!("\n{line}");
 | 
				
			||||||
 | 
					                        break;
 | 
				
			||||||
 | 
					                    } else {
 | 
				
			||||||
 | 
					                        // As the number split-debuginfo options varies,
 | 
				
			||||||
 | 
					                        // concat them into one line.
 | 
				
			||||||
 | 
					                        print!("{line},");
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if mode != "bad-cfg" {
 | 
					                if mode != "bad-cfg" {
 | 
				
			||||||
                    panic!("unexpected");
 | 
					                    panic!("unexpected");
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
@ -412,6 +428,28 @@ command was: `[..]compiler[..]--crate-type [..]`
 | 
				
			|||||||
[..]___[..]
 | 
					[..]___[..]
 | 
				
			||||||
[..]___[..]
 | 
					[..]___[..]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					",
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					        .run();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    p.cargo("build")
 | 
				
			||||||
 | 
					        .env("RUSTC", &funky_rustc)
 | 
				
			||||||
 | 
					        .env("FUNKY_MODE", "no-split-debuginfo")
 | 
				
			||||||
 | 
					        .with_status(101)
 | 
				
			||||||
 | 
					        .with_stderr(
 | 
				
			||||||
 | 
					            "\
 | 
				
			||||||
 | 
					[ERROR] output of --print=split-debuginfo missing when learning about target-specific information from rustc
 | 
				
			||||||
 | 
					command was: `[..]compiler[..]--crate-type [..]`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--- stdout
 | 
				
			||||||
 | 
					[..]___[..]
 | 
				
			||||||
 | 
					[..]___[..]
 | 
				
			||||||
 | 
					[..]___[..]
 | 
				
			||||||
 | 
					[..]___[..]
 | 
				
			||||||
 | 
					[..]___[..]
 | 
				
			||||||
 | 
					[..]___[..]
 | 
				
			||||||
 | 
					[..]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
",
 | 
					",
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
        .run();
 | 
					        .run();
 | 
				
			||||||
@ -430,6 +468,8 @@ command was: `[..]compiler[..]--crate-type [..]`
 | 
				
			|||||||
[..]___[..]
 | 
					[..]___[..]
 | 
				
			||||||
[..]___[..]
 | 
					[..]___[..]
 | 
				
			||||||
[..]
 | 
					[..]
 | 
				
			||||||
 | 
					[..],[..]
 | 
				
			||||||
 | 
					___
 | 
				
			||||||
123
 | 
					123
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user