[Cpan2rpm-general] Patch: Suppress MY->fixin for test cases to prevent breaking of unit tests
Brought to you by:
ekkis
From: Gino L. L. <gle...@gm...> - 2008-08-13 19:19:19
|
Hi, all I've been rebuilding a number of CPAN packages into RPM lately while transitioning from EL4 to EL5 and I noticed I had several SRPMS/spec files call for "--make-no-test". Upon closer investigation, this was mostly due to test cases failing because of line mismatches in the expected output. Some unit tests expect to read back the output at a specific line number in the test file, but these break under cpan2rpm because of the call to the ExtUtils::MY->fixin() call. This is inserted in every spec file prior to calling the Makefile.PL to fix any file (excluding *.bak) that references #!.*perl. I've attached a patch which exposes the following run-time options to cpan2rpm: --no-perlloc-fix --no-test-perlloc-fix The former suppresses the call to MY->fixin entirely. The latter only suppresses the call to MY->fixin() for the following file patterns: - files in t/* - files in tests/* - files ending in ".t" The patch was generated against cpan2rpm 2.028. Hope this helps. - gino |