Check for availability of `cpio` command.
authorRui Ueyama <ruiu@google.com>
Wed, 10 Aug 2016 17:42:26 +0000 (17:42 +0000)
committerRui Ueyama <ruiu@google.com>
Wed, 10 Aug 2016 17:42:26 +0000 (17:42 +0000)
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

lld/test/ELF/reproduce-windows.s
lld/test/ELF/reproduce.s
lld/test/lit.cfg

index 464b270..74fc695 100644 (file)
@@ -1,4 +1,4 @@
-# REQUIRES: x86
+# REQUIRES: x86, cpio
 
 # Test that a repro archive always uses / instead of \.
 # RUN: rm -rf %t.dir
index 9d256c1..9a0b65f 100644 (file)
@@ -1,4 +1,4 @@
-# REQUIRES: x86
+# REQUIRES: x86, cpio
 
 # Extracting the cpio archive can get over the path limit on windows.
 # REQUIRES: shell
index e7c967d..5ca0fab 100644 (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')