Add line numbers to windows-gnu backtraces

Fix formatting
Remove unused imports
Refactor
Fix msvc build
Fix line lengths
Formatting
Enable backtrace tests
Fix using directive on mac
pwd info
Work-around buildbot PWD bug, and fix libbacktrace configuration
Use alternative to `env -u` which is not supported on bitrig
Disable tests on 32-bit windows gnu
This commit is contained in:
Diggory Blake 2015-08-26 01:44:55 +01:00
parent ac12c7f1ed
commit d4fc3ec208
15 changed files with 191 additions and 94 deletions

View file

@ -27,11 +27,12 @@ macro_rules! pos {
() => ((file!(), line!()))
}
#[cfg(all(unix,
not(target_os = "macos"),
not(target_os = "ios"),
not(target_os = "android"),
not(all(target_os = "linux", target_arch = "arm"))))]
#[cfg(any(all(unix,
not(target_os = "macos"),
not(target_os = "ios"),
not(target_os = "android"),
not(all(target_os = "linux", target_arch = "arm"))),
all(windows, target_env = "gnu", not(target_arch = "x86"))))]
macro_rules! dump_and_die {
($($pos:expr),*) => ({
// FIXME(#18285): we cannot include the current position because
@ -42,11 +43,12 @@ macro_rules! dump_and_die {
}
// this does not work on Windows, Android, OSX or iOS
#[cfg(any(not(unix),
target_os = "macos",
target_os = "ios",
target_os = "android",
all(target_os = "linux", target_arch = "arm")))]
#[cfg(not(any(all(unix,
not(target_os = "macos"),
not(target_os = "ios"),
not(target_os = "android"),
not(all(target_os = "linux", target_arch = "arm"))),
all(windows, target_env = "gnu", not(target_arch = "x86")))))]
macro_rules! dump_and_die {
($($pos:expr),*) => ({ let _ = [$($pos),*]; })
}
@ -165,3 +167,4 @@ fn main() {
run_test(&args[0]);
}
}

View file

@ -9,8 +9,8 @@
// except according to those terms.
// no-pretty-expanded FIXME #15189
// ignore-windows FIXME #13259
// ignore-android FIXME #17520
// ignore-msvc FIXME #28133
use std::env;
use std::process::{Command, Stdio};
@ -89,6 +89,7 @@ fn runtest(me: &str) {
"bad output4: {}", s);
}
#[cfg(not(all(windows, target_arch = "x86")))]
fn main() {
let args: Vec<String> = env::args().collect();
if args.len() >= 2 && args[1] == "fail" {
@ -99,3 +100,7 @@ fn main() {
runtest(&args[0]);
}
}
// See issue 28218
#[cfg(all(windows, target_arch = "x86"))]
fn main() {}