RPM Community Forums

Mailing List Message of <rpm-devel>

Re: running make check is supported or it's not?

From: Jeff Johnson <n3npq@mac.com>
Date: Tue 18 Nov 2008 - 14:34:11 CET
Message-id: <3EF10AF1-9224-4DF7-9F56-B4B3E185AF04@mac.com>

On Nov 18, 2008, at 3:46 AM, Peter Volkov wrote:

> Hello.
>
> I've just tried to run tests withing rpm and got the following error:
>
> $ make check
> [snip]
> make[3]: Entering directory `/home/pva/work/rpm-5.1.6/tests'
> --- tmp/version 2008-11-18 11:40:27.000000000 +0300
> +++ ref/version 2008-06-06 21:33:27.000000000 +0400
> @@ -1,2 +1,2 @@
> -rpm (RPM) 5.1.6
> -rpmlib 0x28301800,0x7d8a9000,0x52504d35
> +lt-rpm (RPM) 5.1.DEVEL
> +rpmlib 0x28200000,0x7d800000,0x52504d35
>
> I've tried to fix that on my own but failed. So the question is does
> anybody runs tests in rpm? How? I suppose version number should be  
> fixed
> automatically and if not then how to rebuild hashes correctly? Or  
> may be
> tests are not supported? Thank you in advance for any hints regarding
> tests.
>

I run "make check" from rpm cvs all the time.

However, the (or at least my) goal in make check so far has been to  
devise
a test harness that is extensible, and to drive LCOV/GCOV code  
coverage checks.

There are details, such as version, and certain platform
specific values carried in rpm macros, that a diff against
a static reference file will show as differences.

I usually run
	"make clean check"
examine the differences, and then do
	cp tmp/somefile ref/somefile
and repeat, fixing the immediate hash failure that results with
	cp tmp/.alldigests ref
when running "make check" with rpm-5.1.x.

However the actual test packages that are used
in the tests were not mentioned in EXTRA_DIST in the top-level
Makefile.am, and so are not in the released rpm-5.1.6 tarball.

Some remaining paths mentioned in macros were still relative to
the installed /usr/lib/rpm/ prefix and needed to be rebased
to use scripts from within the rpm tree instead.

Both of those changes were checked in abt 2 weeks ago, and should
be in rpm-5.1.7 when released. I'd like to have a functional
"make check" in rpm-5.1.7.

But atm, running "make cvs" from an rpm cvs build is likely
all that is possible. And there's much more that needs to
be done.

BTW, this link
	http://wraptastic.org/pub/jbj/rpm-5.1.DEVEL-lcov
displays the code coverage within rpm I was able to achieve with
some reasonably simple packages driving straightforward
CLI operations.

hth

73 de Jeff
Received on Tue Nov 18 14:34:47 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.