[lld] r278249 - Check for availability of `cpio` command.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 10 10:42:27 PDT 2016


Author: ruiu
Date: Wed Aug 10 12:42:26 2016
New Revision: 278249

URL: http://llvm.org/viewvc/llvm-project?rev=278249&view=rev
Log:
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.

Modified:
    lld/trunk/test/ELF/reproduce-windows.s
    lld/trunk/test/ELF/reproduce.s
    lld/trunk/test/lit.cfg

Modified: lld/trunk/test/ELF/reproduce-windows.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/reproduce-windows.s?rev=278249&r1=278248&r2=278249&view=diff
==============================================================================
--- lld/trunk/test/ELF/reproduce-windows.s (original)
+++ lld/trunk/test/ELF/reproduce-windows.s Wed Aug 10 12:42:26 2016
@@ -1,4 +1,4 @@
-# REQUIRES: x86
+# REQUIRES: x86, cpio
 
 # Test that a repro archive always uses / instead of \.
 # RUN: rm -rf %t.dir

Modified: lld/trunk/test/ELF/reproduce.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/reproduce.s?rev=278249&r1=278248&r2=278249&view=diff
==============================================================================
--- lld/trunk/test/ELF/reproduce.s (original)
+++ lld/trunk/test/ELF/reproduce.s Wed Aug 10 12:42:26 2016
@@ -1,4 +1,4 @@
-# REQUIRES: x86
+# REQUIRES: x86, cpio
 
 # Extracting the cpio archive can get over the path limit on windows.
 # REQUIRES: shell

Modified: lld/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/lit.cfg?rev=278249&r1=278248&r2=278249&view=diff
==============================================================================
--- lld/trunk/test/lit.cfg (original)
+++ lld/trunk/test/lit.cfg Wed Aug 10 12:42:26 2016
@@ -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')




More information about the llvm-commits mailing list