[lld] r185524 - Guard a test that fails on a Release build.
Rui Ueyama
ruiu at google.com
Wed Jul 3 18:27:05 PDT 2013
On Thu, Jul 4, 2013 at 10:08 AM, Nick Kledzik <kledzik at apple.com> wrote:
>
> On Jul 3, 2013, at 2:09 AM, Rui Ueyama <ruiu at google.com> wrote:
> > Author: ruiu
> > Date: Wed Jul 3 04:09:13 2013
> > New Revision: 185524
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=185524&view=rev
> > Log:
> > Guard a test that fails on a Release build.
> >
> > Modified:
> > lld/trunk/test/layout-error-test.objtxt
> > lld/trunk/test/lit.cfg
> >
> > Modified: lld/trunk/test/layout-error-test.objtxt
> > URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/test/layout-error-test.objtxt?rev=185524&r1=185523&r2=185524&view=diff
> >
> ==============================================================================
> > --- lld/trunk/test/layout-error-test.objtxt (original)
> > +++ lld/trunk/test/layout-error-test.objtxt Wed Jul 3 04:09:13 2013
> > @@ -1,3 +1,4 @@
> > +# REQUIRES: asserts
> This still fails for me. The REQUIRES tag is new to me. Is “asserts”
> always the same thing as DEBUG() in source code? I thought DEBUG and
> asserts were independent configure options.
I think you are right; "asserts" does not meani t's compiled with DEBUG.
Looks like llc knows whether its compiled with DEBUG, so I'll add "debug"
attribute and use it in REQUIRED tag.
REQUIRES tag seems to be used in many tests in LLVM (not LLD).
-Nick
>
> > # RUN: lld -core --add-pass layout -mllvm -debug-only=LayoutPass %s 2>&1
> \
> > # RUN: | FileCheck %s -check-prefix=CHECK
> >
> >
> > Modified: lld/trunk/test/lit.cfg
> > URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/test/lit.cfg?rev=185524&r1=185523&r2=185524&view=diff
> >
> ==============================================================================
> > --- lld/trunk/test/lit.cfg (original)
> > +++ lld/trunk/test/lit.cfg Wed Jul 3 04:09:13 2013
> > @@ -116,3 +116,16 @@ if lit.useValgrind:
> > # Shell execution
> > if platform.system() not in ['Windows'] or lit.getBashPath() != '':
> > config.available_features.add('shell')
> > +
> > +# llc knows whether it is compiled with -DNDEBUG.
> > +import subprocess
> > +try:
> > + llc_cmd = subprocess.Popen([os.path.join(llvm_tools_dir, 'llc'),
> '-version'],
> > + stdout = subprocess.PIPE)
> > +except OSError, why:
> > + print "Could not find llc in " + llvm_tools_dir
> > + exit(42)
> > +
> > +if re.search(r'with assertions', llc_cmd.stdout.read()):
> > + config.available_features.add('asserts')
> > +llc_cmd.wait()
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130704/f6fdbe4f/attachment.html>
More information about the llvm-commits
mailing list