From 130a6eb7fa3ba1c9d78b44f6445f7caa1301a75e Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Thu, 4 Jul 2013 09:29:47 +0000 Subject: [PATCH] Try to guard a test that requires DEBUG(). This is a follow-up patch for r185524. Being assert enabled does not mean that DEBUG() is enabled, so we need to check the existence of DEBUG() itself. llvm-svn: 185619 --- lld/test/layout-error-test.objtxt | 2 +- lld/test/lit.cfg | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lld/test/layout-error-test.objtxt b/lld/test/layout-error-test.objtxt index aefad6c51265..92bbbf212f2c 100644 --- a/lld/test/layout-error-test.objtxt +++ b/lld/test/layout-error-test.objtxt @@ -1,4 +1,4 @@ -# REQUIRES: asserts +# REQUIRES: debug # RUN: lld -core --add-pass layout -mllvm -debug-only=LayoutPass %s 2>&1 \ # RUN: | FileCheck %s -check-prefix=CHECK diff --git a/lld/test/lit.cfg b/lld/test/lit.cfg index ef5510caaaf6..e50d0cea3c7f 100644 --- a/lld/test/lit.cfg +++ b/lld/test/lit.cfg @@ -126,6 +126,8 @@ except OSError, why: print "Could not find llc in " + llvm_tools_dir exit(42) +if re.search(r'DEBUG', llc_cmd.stdout.read()): + config.available_features.add('debug') if re.search(r'with assertions', llc_cmd.stdout.read()): config.available_features.add('asserts') llc_cmd.wait()