From: Reid Kleckner Date: Thu, 14 May 2020 17:31:40 +0000 (-0700) Subject: [LLD] Fix precomp-link.test X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f5a79713b612376baae54cb47c8ec87b14f4b9b3;p=platform%2Fupstream%2Fllvm.git [LLD] Fix precomp-link.test I had a stale directory at %t, so the test passed locally, but not remotely. Skip the %t directory altogether. --- diff --git a/lld/test/COFF/precomp-link.test b/lld/test/COFF/precomp-link.test index d7f189c..b0692ee 100644 --- a/lld/test/COFF/precomp-link.test +++ b/lld/test/COFF/precomp-link.test @@ -26,23 +26,23 @@ error. Edit out this record from the yaml-ified object: Signature: 545589255 ObjectName: 'F:\svn\lld\test\COFF\precomp\precomp.obj' -RUN: obj2yaml %S/Inputs/precomp.obj | grep -v 'SectionData: *04000000' > %t/precomp.yaml -RUN: sed '/S_OBJNAME/,/ObjectName:/d' < %t/precomp.yaml > precomp-no-objname.yaml -RUN: sed 's/Signature: *545589255/Signature: 0/' < %t/precomp.yaml > precomp-zero-sig.yaml -RUN: yaml2obj precomp-no-objname.yaml -o %t/precomp-no-objname.obj -RUN: yaml2obj precomp-zero-sig.yaml -o %t/precomp-zero-sig.obj +RUN: obj2yaml %S/Inputs/precomp.obj | grep -v 'SectionData: *04000000' > %t.precomp.yaml +RUN: sed '/S_OBJNAME/,/ObjectName:/d' < %t.precomp.yaml > precomp-no-objname.yaml +RUN: sed 's/Signature: *545589255/Signature: 0/' < %t.precomp.yaml > precomp-zero-sig.yaml +RUN: yaml2obj precomp-no-objname.yaml -o %t.precomp-no-objname.obj +RUN: yaml2obj precomp-zero-sig.yaml -o %t.precomp-zero-sig.obj -RUN: not lld-link %t/precomp-no-objname.obj %S/Inputs/precomp-a.obj %S/Inputs/precomp-b.obj /nodefaultlib /entry:main /debug /pdb:%t.pdb /out:%t.exe 2>&1 | FileCheck %s -check-prefix FAILURE-NO-SIGNATURE +RUN: not lld-link %t.precomp-no-objname.obj %S/Inputs/precomp-a.obj %S/Inputs/precomp-b.obj /nodefaultlib /entry:main /debug /pdb:%t.pdb /out:%t.exe 2>&1 | FileCheck %s -check-prefix FAILURE-NO-SIGNATURE -RUN: not lld-link %t/precomp-zero-sig.obj %S/Inputs/precomp-a.obj %S/Inputs/precomp-b.obj /nodefaultlib /entry:main /debug /pdb:%t.pdb /out:%t.exe 2>&1 | FileCheck %s -check-prefix FAILURE-NO-SIGNATURE +RUN: not lld-link %t.precomp-zero-sig.obj %S/Inputs/precomp-a.obj %S/Inputs/precomp-b.obj /nodefaultlib /entry:main /debug /pdb:%t.pdb /out:%t.exe 2>&1 | FileCheck %s -check-prefix FAILURE-NO-SIGNATURE FAILURE-NO-SIGNATURE: error: {{.*}}.obj claims to be a PCH object, but does not have a valid signature Check that two PCH objs with duplicate signatures are an error. -RUN: cp %S/Inputs/precomp.obj %t/precomp-dup.obj +RUN: cp %S/Inputs/precomp.obj %t.precomp-dup.obj -RUN: not lld-link %S/Inputs/precomp.obj %t/precomp-dup.obj %S/Inputs/precomp-a.obj %S/Inputs/precomp-b.obj /nodefaultlib /entry:main /debug /pdb:%t.pdb /out:%t.exe 2>&1 | FileCheck %s -check-prefix FAILURE-DUP-SIGNATURE +RUN: not lld-link %S/Inputs/precomp.obj %t.precomp-dup.obj %S/Inputs/precomp-a.obj %S/Inputs/precomp-b.obj /nodefaultlib /entry:main /debug /pdb:%t.pdb /out:%t.exe 2>&1 | FileCheck %s -check-prefix FAILURE-DUP-SIGNATURE FAILURE-DUP-SIGNATURE: error: a PCH object with the same signature has already been provided ({{.*precomp.obj and .*precomp-dup.obj.*}})