Subject: | test style-trailing-space.t fails due to extra space in dynamically generated XS code comment line |
Date: | Sun, 29 Jun 2014 21:38:34 -0400 |
To: | bug-XML-LibXML [...] rt.cpan.org |
From: | James Hall <jimhallsun [...] gmail.com> |
Hi,
Decided to install Test::TrailingSpace to take advantage of running style-trailing-space.t and see what the benefit is. But it seems pretty clear that no one should be able to successfully run this test because it seems the two dynamically generated .c files:
- Devel.c
- LibXML.c
Have a line with a trailing character:
/*
* This file was generated automatically by ExtUtils::ParseXS version 2.21 from the
* contents of Devel.xs. Do not edit this file, edit Devel.xs instead.
*
* ANY CHANGES MADE HERE WILL BE LOST! <—— this line has a trailing space ####
*
*/
Here are some work arounds and/or possible paths to pursue:
#1 - vim the two files prior to testing and remove the trailing space. This is what I choose but it will break automation because these files are dynamically generated.
#2 - Edit t/style-trailing-space.t and change the regular expression to skip these two dynamically generated files. Example change
filename_regex => qr/(?:\.(?:t|pm|pl|xs|c|h|txt|pod|PL)|README|Changes|TODO|LICENSE)\z/,
to
filename_regex => qr/(?:\.(?:t|pm|pl|xs|h|txt|pod|PL)|README|Changes|TODO|LICENSE)\z/,
#3 - I guess you could file a bug against ExtUtils::ParseXS, but I don’t see the point. Why do you need to eliminate trailing spaces on a C comment line? You may want to consider removing this test file.
Here is the error report:
t/style-trailing-space.t .................. # Found trailing space in file 'Devel.c'
# Found trailing space in file 'LibXML.c'
t/style-trailing-space.t .................. 1/1
# Failed test 'No trailing space was found.'
# at t/style-trailing-space.t line 28.
# got: '2'
# expected: '0'
# Looks like you failed 1 test of 1.
t/style-trailing-space.t .................. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
Test Summary Report
-------------------
t/style-trailing-space.t (Wstat: 256 Tests: 1 Failed: 1)
Failed test: 1
Non-zero exit status: 1
Files=70, Tests=2559, 10 wallclock secs ( 0.56 usr 0.27 sys + 6.78 cusr 1.61 csys = 9.22 CPU)
Result: FAIL
Failed 1/70 test programs. 1/2559 subtests failed.
*** Error code 1
make: Fatal error: Command failed for target `test_dynamic'
SHLOMIF/XML-LibXML-2.0116.tar.gz
make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports SHLOMIF/XML-LibXML-2.0116.tar.gz
Failed during this command:
SHLOMIF/XML-LibXML-2.0116.tar.gz : make_test NO