Skip to content

running the test suite against an installed librnp (and/or against the binaries rnp and rnpkeys) #1435

Open
@dkg

Description

@dkg

For the debian testing infrastructure it's generally desirable to be able to run the test suite against the installed version of the package.

In particular, I would like to be able to run the test suite against whatever system-installed librnp is there. But I'm not enough of a cmake guru to know how to make this happen easily. The main examples I can see are in the ci/ folder, but those seem to expect general system privileges, or installing software from the wider Internet.

Is there a way that I am missing that I can run some substantial portion of the test suite against an existing, installed librnp-dev package (that package would contain headers, pkg-config info, and the appropriate .so)?

If there isn't a clear way to do that, is that something that would be desirable upstream? having a proper "autopkgtest" for the debian package would make it easier to get new (non-buggy) versions of rnp into debian testing more quickly. I could of course hand-write such a test and ship it in debian on my own, but if there are parts of the upstream RNP test suite that should be run against the installed library, i'd prefer to source them directly from upstream.

Note that this sort of test has to test the installed version -- so it's likely going to be limited to tests at the library (librnp) or binary (rnp or rnpkeys) API boundaries. It should not include any internal unit tests that require a rebuild of the source.

For example, src/tests/support.h seems to #include several files that are not part of the system librnp-dev installation (e.g. "../rnp/fficli.h"), which makes it difficult to know what code the test is running against.

As a first pass, i could just try building all of src/examples/*.c, but i'm not sure how to exercise them to test that they behave as expected. so it'd be great if there was something more comprehensive for testing the installed library, as well as some sort of binary-boundary test that just exercises rnp and rnpkeys directly.

If you have any questions about this situation, i'm happy to try to dig up answers for them. If you know of something easy i can already do (i've only done a cursory skim, i haven't looked in depth), please let me know.

Metadata

Metadata

Type

No type

Projects

Status

High priority

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions