[ELF,test] Add env LLD_IN_TEST=1 to make some tests work if RUN_LLD_MAIN_TWICE

This commit is contained in:
Fangrui Song
2025-01-25 16:58:52 -08:00
parent a9e92beb25
commit b7195e8e04
2 changed files with 2 additions and 2 deletions

View File

@@ -220,7 +220,7 @@ _start:
## Test erroring on a recursive response file, but only once.
# RUN: echo @%t.responsefile > %t.responsefile
# RUN: not ld.lld %t @%t.responsefile 2>&1 | FileCheck %s --check-prefix=RECRSP
# RUN: env LLD_IN_TEST=1 not ld.lld %t @%t.responsefile 2>&1 | FileCheck %s --check-prefix=RECRSP
# RECRSP: recursive expansion of: '{{.*}}.responsefile'
# RECRSP-NOT: recursive expansion of

View File

@@ -2,7 +2,7 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
## Test that we only write to "-" once.
# RUN: LLD_IN_TEST=2 ld.lld %t.o -o - > %t1
# RUN: env LLD_IN_TEST=2 ld.lld %t.o -o - > %t1
# RUN: llvm-objdump -d %t1 | FileCheck %s
# CHECK: nop