Closed fingolfin closed 2 years ago
I am using testpackages, so I want a log as a file, but if one can use tee
like in other targets, then I will be happy.
What you miss however is that there are two targets, testpackage
and testpackages
, and pkg-tests.sh
uses
make testpackage PKGNAME=$PKG_NAME
The other target indeed needs to create workspace, because it is used again and again for each new package.
Yeah, I mixed up testpackages
and testpackage
(I've updated the description of this issue to correct that). But there is very little difference between them; in particular, testpackage
also uses workspaces.
And as I wrote, I don't want to touch your "test" targets in Makefile.rules
atall, I want to do it directly, which is IMHO much* simpler, and thus much easier to debug. I tried earlier to figure out what testpackage
and testpackages
do exactly but gave up after several levels of helper files being read, other files being generated, those being read again, more files being generated... :-)
testpackage
was copypasted from testpackages
, that's why. The latter uses helper files, the former could be certainly rewritten by @someone
...
I could work on this (but not immediately, so if someone else is interested, by all means: go ahead!) But then it'd be nice to be able to test this without testing it with all packages. Like, I'd like to pick a few packages and then trigger the job with just that (could be as simple as: "just put the first 10 packages into the job matrix, then stop").
OK, typing this now, I realize that I can probably achieve this by editing the workflow file https://github.com/gap-infra/integration/blob/main/.github/workflows/pkg-tests.yml and changing the for PKG in
ls */PackageInfo.g ...` loop appropriately. OK, fine, that's enough for me then :-)
Yeah, or just overwriting the matrix by hardcoding one after the for
loop 🙂
I will look into allowing these workflows to be manually dispatched in a way that allows for only one package to be tested.
@fingolfin Your can now run that Workflow file with just one package by manually dispatching it: https://github.com/gap-infra/integration/actions/workflows/pkg-tests.yml
Right now,
pkg-tests.sh
runsmake testpackages
, which logs all output into files. We only print those files later. But that means that in the case of test runs which time out (e.g. due to an endless recursion/loop), we see nothing, just the information by Travis that there was a timeout. In particular, we don't see where it hangs (in which of the three different test suite runs, and in which file and line)It would IMHO be much nicer if each test was run and immediately printed its output, while running. That would also mean that one gets output soon for the first of the three runs through the test suite; i.e., I could already see that the first of three test suite runs passed/failed, before the other two are done (granted, that's not something very important, it's just another bonus of such a change).
Technically, there are several ways to do this. We could modify
testpackages
, but my understanding is that @alex-konovalov uses this elsewhere.The easiest would be IMHO to just not use
testpackages
anymore, and just run the tests directly, it's not hard after all. This is what the Makefile rule for it: (UPDATE: accidentally had quotedtestpackages
target here, now corrected)Since we only test a single package each time, we don't need to bother with creating workspaces. I also see no benefit in using
CreatePackageTestsInput
(but I may be missing something?).Instead, we could use
TestOnePackage
from https://github.com/gap-infra/gap-docker-pkg-tests-master-devel/blob/master/ci.g (and indeed, perhaps merge that function back into GAP'sTestPackage
). And then pipe a program like this into GAP:repeated three times with different args for GAP.