From 2dc5645b946c8fc3c9cf59b9c9c8515c4e62e807 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Wed, 10 Aug 2016 17:42:26 +0000 Subject: [PATCH] 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 --- lld/test/ELF/reproduce-windows.s | 2 +- lld/test/ELF/reproduce.s | 2 +- lld/test/lit.cfg | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lld/test/ELF/reproduce-windows.s b/lld/test/ELF/reproduce-windows.s index 464b270..74fc695 100644 --- a/lld/test/ELF/reproduce-windows.s +++ b/lld/test/ELF/reproduce-windows.s @@ -1,4 +1,4 @@ -# REQUIRES: x86 +# REQUIRES: x86, cpio # Test that a repro archive always uses / instead of \. # RUN: rm -rf %t.dir diff --git a/lld/test/ELF/reproduce.s b/lld/test/ELF/reproduce.s index 9d256c1..9a0b65f 100644 --- a/lld/test/ELF/reproduce.s +++ b/lld/test/ELF/reproduce.s @@ -1,4 +1,4 @@ -# REQUIRES: x86 +# REQUIRES: x86, cpio # Extracting the cpio archive can get over the path limit on windows. # REQUIRES: shell diff --git a/lld/test/lit.cfg b/lld/test/lit.cfg index e7c967d..5ca0fab 100644 --- a/lld/test/lit.cfg +++ b/lld/test/lit.cfg @@ -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') -- 2.7.4