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:
Rui Ueyama 2016-05-05 02:18:04 +00:00
parent acef17aa4a
commit ac75a27809
2 changed files with 16 additions and 0 deletions

View File

@ -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

View File

@ -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')