Skip to content

Commit

Permalink
Fix remap-std test as CHECK-NOT doesn't seem to work with regex
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeuw committed Apr 7, 2021
1 parent 0afce07 commit 6e24725
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/test/codegen/remap_path_prefix/issue-73167-remap-std.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
// ignore-windows

// compile-flags: -g -C no-prepopulate-passes --remap-path-prefix={{cwd}}/library/std=/the/std
// compile-flags: -g -C no-prepopulate-passes --remap-path-prefix=/=/the/root/

// Here we check that imported code from std has their path remapped
// Ideally we want to do
// COM: CHECK-NOT: !DIFile(filename: "{{cwd}}/library/std/src/thread/mod.rs"
// But {{cwd}} will not be expanded here, so we have to check on the bit afterwards
// Note that we can't use a positive check on `/the/std` either, because the rempap flag will
// have no effect when `remap-debuginfo` is set to true in `config.toml`, causing the test to fail

// CHECK-NOT: !DIFile(filename: "{{.*}}/library/std"
// CHECK: !DIFile(filename: "{{/the/root/.*/library/std/src/panic.rs}}"
fn main() {
std::thread::spawn(|| {
println!("hello");
Expand Down

0 comments on commit 6e24725

Please sign in to comment.