tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Skip building the test programs in parallel/threadingbuildingblocks



Taylor R Campbell <campbell+netbsd-tech-pkg%mumble.net@localhost> writes:

>> Date: Thu, 11 Aug 2022 07:05:04 +0000 (UTC)
>> From: Charlotte Koch <charlotte%netbsd.org@localhost>
>> 
>> So, I think we can speed up the build significantly in the typical use
>> case by building the test programs iff we want to run the tests in the
>> first place. What do we think of my diff (attached) ?
>
> How much time is saved?  What is the fraction of the build time?
>
> With the patch, how would pkgsrc know whether the user is about to do
> `bmake test' manually, while not setting PKGSRC_RUN_TEST?  I do this
> regularly while developing packages.

I agree that 'make test' has to work even if PKGSRC_RUN_TEST is off.  I
would say that it's more normal to run tests by hand than to have it
enabled.  I do it when updating packages, usually.

> (Personally I tend to think that tests should not only be built by
> default but also installed by default -- maybe as separate packages --
> so you can run self-tests on the target machine before running it on
> the same machine, not just during development or builds on the build
> machine.  This is also necessary for cross-compiled tests to be
> useful.  But it depends more heavily on upstream support, of course.)

Also, I find that many upstreams one can do

  make
  # just builds what is needed to install
  make install

  make check
  # builds the  test programs and runs them


I would suggest that if upstream builds the test programs when you just
run make then either:

  1) upstream thinks this is a good thing and they are right, or

  2) it's buggy of upstream to make things that aren't needed and
  someone should file a bug report and fix it.


There's a harder problem that you didn't bring up, which is that there
are depends for tests that don't exist for running, but that might be ok
with TEST_DEPENDS; my memory is fuzzy from the last time I dug into
that.

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index