Skip to content

Commit

Permalink
Improved PR based on feedback. Fixed ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Apr 14, 2020
1 parent cebd0ed commit a840b45
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,6 @@ fn main() -> anyhow::Result<()> {
// `rustfmt` if it's installed.
let output = out_dir.join("generated_tests.rs");
fs::write(&output, out.buffer)?;
drop(Command::new("rustfmt").arg(&output).status());
Command::new("rustfmt").arg(&output).status();
Ok(())
}
4 changes: 2 additions & 2 deletions tests/ignores.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ cranelift::spec::linking on windows
cranelift::spec::memory_grow on windows
cranelift::spec::memory_trap on windows
cranelift::spec::select on windows
cranelift::spec::stack-guard-page on windows
cranelift::spec::skip_stack_guard_page on windows
cranelift::spec::traps on windows
cranelift::spec::unreachable on windows
cranelift::spec::unwind on windows
Expand All @@ -47,7 +47,7 @@ llvm::spec::linking

# LLVM AArch64
llvm::spec::atomic on aarch64 # Out of range relocations.
llvm::spec::stack-guard-page on aarch64 # Uncaught SIGSEGV only on release builds
llvm::spec::skip_stack_guard_page on aarch64 # Uncaught SIGSEGV only on release builds

# LLVM Windows
llvm::spec::address on windows
Expand Down
5 changes: 3 additions & 2 deletions tests/test-generator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ pub fn build_ignores_from_textfile(path: PathBuf) -> anyhow::Result<Ignores> {
} else {
line
};

let line = line.trim().to_string();

// If the lines contains ` on ` it means the test should be ignored
// on that platform
let (line, target) = if line.contains(" on ") {
Expand All @@ -62,8 +65,6 @@ pub fn build_ignores_from_textfile(path: PathBuf) -> anyhow::Result<Ignores> {
} else {
(line, None)
};

let line = line.trim().to_string();
if line.len() == 0 {
continue;
}
Expand Down

0 comments on commit a840b45

Please sign in to comment.