[lld] r370211 - lld: Make a test not fail if "repro" is part of the build directory name

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 28 07:33:35 PDT 2019


Author: nico
Date: Wed Aug 28 07:33:35 2019
New Revision: 370211

URL: http://llvm.org/viewvc/llvm-project?rev=370211&view=rev
Log:
lld: Make a test not fail if "repro" is part of the build directory name

r268231 made it so that the name of the --reproduce archive
is no longer listed in the response file. Previously, with
"--reproduce repro.tar" the response file would contain

  repro/home/.../llvm-build-dir/.../foo.o

but after that change it contained

  home/.../llvm-build-dir/.../foo.o

instead. The test added for this in r268231 checked that
the response file doesn't contain the string "repro", but
if the build dir is named e.g. "llvm-build-repro" then the
test fails because of that.

Change the assert to check that "repro" doesn't exist at the
beginning of the line instead. I verified that the test
still fails with r268231 reverted.

The test technically still fails if someone builds llvm in a directory
'/repro' below the root directory. Don't do that :)

Modified:
    lld/trunk/test/ELF/reproduce.s

Modified: lld/trunk/test/ELF/reproduce.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/reproduce.s?rev=370211&r1=370210&r2=370211&view=diff
==============================================================================
--- lld/trunk/test/ELF/reproduce.s (original)
+++ lld/trunk/test/ELF/reproduce.s Wed Aug 28 07:33:35 2019
@@ -13,7 +13,7 @@
 
 # RUN: FileCheck %s --check-prefix=RSP < repro/response.txt
 # RSP: {{^}}--hash-style gnu{{$}}
-# RSP-NOT: repro{{[/\\]}}
+# RSP-NOT: {{^}}repro{{[/\\]}}
 # RSP-NEXT: {{[/\\]}}foo.o
 # RSP-NEXT: -o bar
 # RSP-NEXT: -shared




More information about the llvm-commits mailing list