compiletest: Add support for // ignore-musl
Add the ability to ignore a test based on the environment of the triple being used.
This commit is contained in:
parent
7dd62155d8
commit
60f8f6bde9
@ -170,6 +170,9 @@ fn ignore_stage(config: &Config) -> String {
|
||||
format!("ignore-{}",
|
||||
config.stage_id.split('-').next().unwrap())
|
||||
}
|
||||
fn ignore_env(config: &Config) -> String {
|
||||
format!("ignore-{}", util::get_env(&config.target).unwrap_or("<unknown>"))
|
||||
}
|
||||
fn ignore_gdb(config: &Config, line: &str) -> bool {
|
||||
if config.mode != common::DebugInfoGdb {
|
||||
return false;
|
||||
@ -231,6 +234,7 @@ fn ignore_lldb(config: &Config, line: &str) -> bool {
|
||||
!parse_name_directive(ln, &ignore_target(config)) &&
|
||||
!parse_name_directive(ln, &ignore_architecture(config)) &&
|
||||
!parse_name_directive(ln, &ignore_stage(config)) &&
|
||||
!parse_name_directive(ln, &ignore_env(config)) &&
|
||||
!(config.mode == common::Pretty && parse_name_directive(ln, "ignore-pretty")) &&
|
||||
!(config.target != config.host && parse_name_directive(ln, "ignore-cross-compile")) &&
|
||||
!ignore_gdb(config, ln) &&
|
||||
|
@ -60,6 +60,10 @@ pub fn get_arch(triple: &str) -> &'static str {
|
||||
panic!("Cannot determine Architecture from triple");
|
||||
}
|
||||
|
||||
pub fn get_env(triple: &str) -> Option<&str> {
|
||||
triple.split('-').nth(3)
|
||||
}
|
||||
|
||||
pub fn make_new_path(path: &str) -> String {
|
||||
assert!(cfg!(windows));
|
||||
// Windows just uses PATH as the library search path, so we have to
|
||||
|
Loading…
Reference in New Issue
Block a user