[PATCH] Enable YAMLParser tests (They were never enabled and never ran it seems)

Alex L arphaman at gmail.com
Fri May 1 17:32:21 PDT 2015


2015-05-01 17:26 GMT-07:00 Justin Bogner <mail at justinbogner.com>:

> Alex Lorenz <arphaman at gmail.com> writes:
> > Hi bogner, bob.wilson, Bigcheese,
> >
> > So it seems that the tests for yaml parses that use yaml-bench never
> > actually ran because lit.cfg didn't include
> > the '.data' file extension that those tests have.
> >
> > I've attached the patch that re-enables them by adding the '.data'
> > extension to lit.cfg. But maybe it would
> > be better to rename all the tests in test/YAMLParser so they would use
> > the '.test' file extension?
>
> The .data extension seems a bit strange and arbitrary, so it probably
> makes sense to just rename these to .test and be done with it. If
> there's a good reason for them to be named .data, we should add a lit
> config in test/YAMLParser to allow that, rather than doing it at the top
> level.
>

I don't think there's a specific reason for the '.data' extension, I think
that '.test' would be better.


>
> > I've also fixed some tests that were failing for me there.
>
> It's a bit surprising that you've fixed these by removing XFAILs. Are
> these features that were added but nobody updated the tests since they
> weren't run anyway?
>
> In any case, removing the FileCheck makes these tests pretty useless -
> we should be checking *something*.
>

I agree, I'll try to improve these tests. I think those tests got added in
one big commit that
committed a lot of the initial yaml parser tests, and yes, they weren't run
since the first commit
it seems. I think that they were valid at the time of that commit, but now
that those bugs that
caused those tests to fail got fixed, so they have to be updated.



>
> > REPOSITORY
> >   rL LLVM
> >
> > http://reviews.llvm.org/D9448
> >
> > Files:
> >   test/YAMLParser/spec-07-05.data
> >   test/YAMLParser/spec-08-04.data
> >   test/YAMLParser/spec-08-06.data
> >   test/YAMLParser/spec-09-14.data
> >   test/lit.cfg
> >
> > Index: test/YAMLParser/spec-07-05.data
> > ===================================================================
> > --- test/YAMLParser/spec-07-05.data
> > +++ test/YAMLParser/spec-07-05.data
> > @@ -1,10 +1,6 @@
> > -# RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
> > -#
> > -# We don't currently parse TAG directives.
> > -# XFAIL: *
> > +# RUN: yaml-bench -canonical %s 2>&1
> >
> >  %TAG ! !foo
> >  %TAG ! !foo
> >  bar
> >
> > -# CHECK: error
> > Index: test/YAMLParser/spec-08-04.data
> > ===================================================================
> > --- test/YAMLParser/spec-08-04.data
> > +++ test/YAMLParser/spec-08-04.data
> > @@ -1,9 +1,4 @@
> > -# RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
> > -#
> > -# We don't currently look at the content of literal tags.
> > -# XFAIL: *
> > +# RUN: yaml-bench -canonical %s 2>&1
> >
> >  - !<!> foo
> >  - !<$:?> bar
> > -
> > -# CHECK: error
> > Index: test/YAMLParser/spec-08-06.data
> > ===================================================================
> > --- test/YAMLParser/spec-08-06.data
> > +++ test/YAMLParser/spec-08-06.data
> > @@ -1,7 +1,4 @@
> > -# RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
> > -#
> > -# We don't currently validate tags.
> > -# XFAIL: *
> > +# RUN: yaml-bench -canonical %s 2>&1
> >
> >  %TAG !o! tag:ben-kiki.org,2000:
> >  ---
> > @@ -9,4 +6,3 @@
> >  - !o! bar
> >  - !h!type baz
> >
> > -# CHECK: error
> > Index: test/YAMLParser/spec-09-14.data
> > ===================================================================
> > --- test/YAMLParser/spec-09-14.data
> > +++ test/YAMLParser/spec-09-14.data
> > @@ -1,7 +1,4 @@
> > -# RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
> > -#
> > -# Not quite sure why this doesn't fail.
> > -# XFAIL: *
> > +# RUN: yaml-bench -canonical %s 2>&1
> >
> >  ---
> >  --- ||| : foo
> > @@ -17,5 +14,3 @@
> >  }
> >  ]
> >  ...
> > -
> > -# CHECK: error
> > Index: test/lit.cfg
> > ===================================================================
> > --- test/lit.cfg
> > +++ test/lit.cfg
> > @@ -41,7 +41,7 @@
> >
> >  # suffixes: A list of file extensions to treat as test files. This is
> overriden
> >  # by individual lit.local.cfg files in the test subdirectories.
> > -config.suffixes = ['.ll', '.c', '.cxx', '.test', '.txt', '.s']
> > +config.suffixes = ['.ll', '.c', '.cxx', '.test', '.txt', '.s', '.data']
> >
> >  # excludes: A list of directories to exclude from the testsuite. The
> 'Inputs'
> >  # subdirectories contain auxiliary inputs for various tests in their
> parent
> >
> > EMAIL PREFERENCES
> >   http://reviews.llvm.org/settings/panel/emailpreferences/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150501/d26f6326/attachment.html>


More information about the llvm-commits mailing list