Skip to content

Commit 60fce68

Browse files
---
yaml --- r: 129630 b: refs/heads/try c: e72e4df h: refs/heads/master v: v3
1 parent d152b14 commit 60fce68

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 0d3bd7720c50e3ada4bac77331d43926493be4fe
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 0d3bd7720c50e3ada4bac77331d43926493be4fe
5-
refs/heads/try: 849ae5d8815c54d135eb9d58cae77c2e6dcac55a
5+
refs/heads/try: e72e4dfc74ca65d6b3e0d821b94a34764ab2c63d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/compiletest/compiletest.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -381,17 +381,23 @@ pub fn make_metrics_test_closure(config: &Config, testfile: &Path) -> test::Test
381381

382382
fn extract_gdb_version(full_version_line: Option<String>) -> Option<String> {
383383
match full_version_line {
384-
Some(full_version_line) => {
384+
Some(ref full_version_line)
385+
if full_version_line.as_slice().trim().len() > 0 => {
385386
let full_version_line = full_version_line.as_slice().trim();
386-
let re = Regex::new(r"[^0-9]([0-9]\.[0-9])([^0-9]|$)").unwrap();
387+
388+
let re = Regex::new(r"(^|[^0-9])([0-9]\.[0-9])([^0-9]|$)").unwrap();
387389

388390
match re.captures(full_version_line) {
389391
Some(captures) => {
390-
Some(captures.at(1).to_string())
392+
Some(captures.at(2).to_string())
393+
}
394+
None => {
395+
println!("Could not extract GDB version from line '{}'",
396+
full_version_line);
397+
None
391398
}
392-
None => None
393399
}
394400
},
395-
None => None
401+
_ => None
396402
}
397403
}

branches/try/src/compiletest/runtest.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,9 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
473473

474474
match config.gdb_version {
475475
Some(ref version) => {
476+
println!("NOTE: compiletest thinks it is using GDB version {}",
477+
version.as_slice());
478+
476479
if header::gdb_version_to_int(version.as_slice()) >
477480
header::gdb_version_to_int("7.4") {
478481
// Add the directory containing the pretty printers to
@@ -488,7 +491,10 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
488491
.as_slice());
489492
}
490493
}
491-
_ => { /* nothing to do */ }
494+
_ => {
495+
println!("NOTE: compiletest does not know which version of \
496+
GDB it is using");
497+
}
492498
}
493499

494500
// Load the target executable

0 commit comments

Comments
 (0)