gnupg icon indicating copy to clipboard operation
gnupg copied to clipboard

Add Travis testing

Open noloader opened this issue 5 years ago • 5 comments

This commit adds Travis testing to the GnuPG suite.

The GnuPG testing clones its prerequisites, tests the prerequisites, installs the prerequisites, and then builds and tests GnuPG. All components in the suite are tested through GnuPG.

Testing of GnuPG and components includes Linux, OS X, AMD64, PPC64, Aarch64 and s390x under both GCC and Clang. Additionally, older Linux (Xenial) and older OS X (El Capitan) are tested. Finally, Ubsan and Asan are tested.

The testing pipeline is revealing a lot of problems in GnuPG sources, from compile problems on PowerPC to undefined behavior and memory errors. You can find the results at Noloader | GnuPG fork, where the CI pipeline with Travis is in effect.

The immediate problem at the moment is the requirement for --enable-maintainer-mode when working from Git sources. For the purposes of testing the build and the code in a CI pipeline, maintainer mode is mostly irrelevant. We need to repeatedly build the suite in different configurations to ensure the suite builds and performs as expected. We don't need 28 or so builds that build the docs. Document building not only breaks every build, it also adds additional time to the build, wastes cpu cycles and wastes storage. A few --enable-maintainer-mode are fine to test the feature for maintainers, but 28 or so is excessive.

I think the project should provide better support for a Continuous Integration pipeline. Running Travis after a commit or every night would have caught all of the non-document errors present in the code. Also see Github sources are difficult to test in the issue tracker.

noloader avatar Apr 01 '20 14:04 noloader

@noloader This is a read-only mirror which gets no attention from the maintainers. See the repository description for links to the official bugtracker and mailinglists.

Edit: From the main page of the repo:

Screenshot_20210816_150115

jotoho avatar Aug 16 '21 13:08 jotoho

@jotoho, IMO your comment only partially makes sense WRT this PR, because the GnuPG project currently lacks a CI infrastructure, which Github offers nicely. Also this read-only mirror of the original Git repository is fully sufficient to perform CI tests. But you are correctly denoting, that the GnuPG maintainers should be triggered by other means, e.g. on the mailing list, to take a look at this contribution.

@noloader, I appreciate your effort very much. IMO, CI tests for GnuPG are long overdue, as you already pointed out above. As the original GnuPG repository also uses Git, it is technically easy to transfer PRs; but note that it may make sense to separate the Github specific parts (which set up the CI pipeline) and only integrate the parts of your PR, which enhance GnuPG to be CI tested. IMO, you might discuss that with the maintainers, first (i.e., before altering this PR). But discussing your PR and the overarching topic (CI tests, and adaptions of the GnuPG source for them) shall take place at https://dev.gnupg.org/ or https://lists.gnupg.org/pipermail/gnupg-devel/

P.S.: @dd9jn, what do you think?

Olf0 avatar Aug 17 '21 03:08 Olf0

On Mon, 16 Aug 2021 20:32, olf said:

@noloader, I appreciate your effort very much. IMO, CI tests for GnuPG are long overdue, as you already pointed out above.

Actually we have had CIs over a long time. In the early 00ies using the HP test drive program, later the FSF French computing farm, and until 2017 a local Jenkins installation. The problem with all of that is that services cease to exist and that due to too many false positive error reports a lot of human resources are bound.

We are planning to get a Buildbot instance up but we had no luck with two admins assigned to that task. Don't ask.

We do not use Github so we won't maintain a Github based CI. We also need to run tests on Windows which is our primary sources for revenues.

Salam-Shalom,

Werner

-- Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.

dd9jn avatar Aug 17 '21 08:08 dd9jn

@noloader: I have been a bit feisty with my recent response. This might have been be due to the fact that the notification mail came without context/ Thus my rant about problems I experienced with CIs in the past. Actually we are looking for QA people to take care of automated - and foremost manual - testing. Unfortunately is is not easy to find them.

Let's look at your problem: You say that --enable-maintainer-mode is a problem for you because it also builds the documentation` - is that correct? Some of the libraries do have a --disable-doc configure option but some don't have. Would it be helpful for you if we add a --disable-doc also to gnupg and maybe other libs? Do you have a list? If so, would you mind to open a bug at dev.gnupg.org ?

dd9jn avatar Aug 22 '21 12:08 dd9jn

@noloader two things I observed:

  1. https://travis-ci.org/github/noloader/gnupg displays "This is not an active repository" and "Since June 15th, 2021, the building on travis-ci.org is ceased. Please use travis-ci.com from now on."! Thus currently no results to look at.
  2. Because the "master" branch at GnuPG is always WIP, it is often in a "known broken state", which is fine. Hence many of the issues a CI run of "master" detects are irrelevant. IMO it makes much more sense to pick the most recent release branch of each of the tools from the GnuPG-framework for CI runs: gpg proper, libgcrypt, libgpg-error, libassuan, libksba etc.

Olf0 avatar Aug 22 '21 23:08 Olf0