Check for availability of `cpio` command.

cpio may not be available on Windows, so it is better to check
for availability before running the command in a test.

llvm-svn: 278249
This commit is contained in:
Rui Ueyama 2016-08-10 17:42:26 +00:00
parent c1f6cd2980
commit 2dc5645b94
3 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# REQUIRES: x86
# REQUIRES: x86, cpio
# Test that a repro archive always uses / instead of \.
# RUN: rm -rf %t.dir

View File

@ -1,4 +1,4 @@
# REQUIRES: x86
# REQUIRES: x86, cpio
# Extracting the cpio archive can get over the path limit on windows.
# REQUIRES: shell

View File

@ -252,3 +252,7 @@ if cvtres and rc:
# Check if "lib.exe" command exists.
if lit.util.which('lib', config.environment['PATH']):
config.available_features.add('winlib')
# Check if "cpio" command exists.
if lit.util.which('cpio', config.environment['PATH']):
config.available_features.add('cpio')