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

Justin Bogner mail at justinbogner.com
Fri May 1 17:26:55 PDT 2015


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'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*.

> 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/



More information about the llvm-commits mailing list