Add a test for --reproduce on Windows.
It is insanely hard to write a test that works both on Windows and Unix. I tried to workaround it with cpio's minor options, but the behaviors of the options were myterious. It just doesn't worth to spend time on it. And probably minor options could break buildbots that doesn't have the GNU version of cpio command. In this patch, I simply added a separate test file that runs only on Windows. llvm-svn: 268596
This commit is contained in:
parent
acef17aa4a
commit
ac75a27809
|
@ -0,0 +1,12 @@
|
|||
# REQUIRES: x86, system-windows
|
||||
|
||||
# RUN: rm -rf %t.dir
|
||||
# RUN: mkdir -p %t.dir/build
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.dir/build/foo.o
|
||||
# RUN: cd %t.dir
|
||||
# RUN: ld.lld --hash-style=gnu build/foo.o -o bar --reproduce repro
|
||||
# RUN: cpio -t < repro.cpio | grep -F 'repro\%:t.dir\build\foo.o' -
|
||||
|
||||
.globl _start
|
||||
_start:
|
||||
ret
|
|
@ -195,6 +195,10 @@ if execute_external:
|
|||
if platform.system() in ['Darwin']:
|
||||
config.available_features.add('system-linker-mach-o')
|
||||
|
||||
# Running on Windows
|
||||
if platform.system() in ['Windows'] and re.match(r'.*-win32$', config.target_triple):
|
||||
config.available_features.add('system-windows')
|
||||
|
||||
# Running on ELF based *nix
|
||||
if platform.system() in ['FreeBSD', 'Linux']:
|
||||
config.available_features.add('system-linker-elf')
|
||||
|
|
Loading…
Reference in New Issue