Skip to content

Commit 6642792

Browse files
---
yaml --- r: 133110 b: refs/heads/dist-snap c: e72e4df h: refs/heads/master v: v3
1 parent 188362b commit 6642792

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
@@ -6,7 +6,7 @@ refs/heads/try: 457a3c991d79b971be07fce75f9d0c12848fb37c
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 849ae5d8815c54d135eb9d58cae77c2e6dcac55a
9+
refs/heads/dist-snap: e72e4dfc74ca65d6b3e0d821b94a34764ab2c63d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/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/dist-snap/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)