X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftools%2Fcompiletest%2Fsrc%2Fheader.rs;h=ab5594f36050d6ea85acd1dd64240063611da986;hb=3a6bef0cbd01227bbcf593e8504164120a984fdc;hp=dbc477585cbfc0b6e30f0e2d63f864f3df986447;hpb=bab03cecfeadcbc79ee2aead61c4de973e5649a0;p=rust.git diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index dbc477585cb..ab5594f3605 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -57,9 +57,9 @@ enum ParsedNameDirective { NoMatch, /// Match. Match, - /// Mode was DebugInfoBoth and this matched gdb. + /// Mode was DebugInfoGdbLldb and this matched gdb. MatchGdb, - /// Mode was DebugInfoBoth and this matched lldb. + /// Mode was DebugInfoGdbLldb and this matched lldb. MatchLldb, } @@ -81,13 +81,17 @@ pub fn from_file(config: &Config, testfile: &Path) -> Self { revisions: vec![], }; - if config.mode == common::DebugInfoBoth { + if config.mode == common::DebugInfoGdbLldb { if config.lldb_python_dir.is_none() { props.ignore = props.ignore.no_lldb(); } if config.gdb_version.is_none() { props.ignore = props.ignore.no_gdb(); } + } else if config.mode == common::DebugInfoCdb { + if config.cdb.is_none() { + props.ignore = Ignore::Ignore; + } } let rustc_has_profiler_support = env::var_os("RUSTC_PROFILER_SUPPORT").is_some(); @@ -133,12 +137,12 @@ pub fn from_file(config: &Config, testfile: &Path) -> Self { } } - if (config.mode == common::DebugInfoGdb || config.mode == common::DebugInfoBoth) && + if (config.mode == common::DebugInfoGdb || config.mode == common::DebugInfoGdbLldb) && props.ignore.can_run_gdb() && ignore_gdb(config, ln) { props.ignore = props.ignore.no_gdb(); } - if (config.mode == common::DebugInfoLldb || config.mode == common::DebugInfoBoth) && + if (config.mode == common::DebugInfoLldb || config.mode == common::DebugInfoGdbLldb) && props.ignore.can_run_lldb() && ignore_lldb(config, ln) { props.ignore = props.ignore.no_lldb(); } @@ -804,7 +808,7 @@ fn parse_cfg_name_directive(&self, line: &str, prefix: &str) -> ParsedNameDirect ParsedNameDirective::Match } else { match self.mode { - common::DebugInfoBoth => { + common::DebugInfoGdbLldb => { if name == "gdb" { ParsedNameDirective::MatchGdb } else if name == "lldb" { @@ -813,6 +817,11 @@ fn parse_cfg_name_directive(&self, line: &str, prefix: &str) -> ParsedNameDirect ParsedNameDirective::NoMatch } }, + common::DebugInfoCdb => if name == "cdb" { + ParsedNameDirective::Match + } else { + ParsedNameDirective::NoMatch + }, common::DebugInfoGdb => if name == "gdb" { ParsedNameDirective::Match } else {