Re: NO_TEST, do-test: and TEST_DEPENDS?
- Reply: Bjoern A. Zeeb: "Re: NO_TEST, do-test: and TEST_DEPENDS?"
- In reply to: Bjoern A. Zeeb: "Re: NO_TEST, do-test: and TEST_DEPENDS?"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 24 May 2022 15:47:45 UTC
I think Mk/bsd.port.mk should be fixed. Actual jobs, defs related to TEST_* should be quoted with .if !defined(NO_TEST) ... .endif to avoid test-related jobs if NO_TEST is defined. In top comments in Mk/bsd.port.mk, (tabs merged) line 301-311 # TEST_DEPENDS - A list of "path:dir[:target]" tuples of other ports this # package depends on in the "test" stage. "path" is the # name of a file if it starts with a slash (/), an # executable otherwise. make will test for the existence # (if it is a full pathname) or search for it in your # $PATH (if it is an executable) and go into "dir" to do # a "make all install" if it's not found. If the third # field ("target") exists, it will be used instead of # ${DEPENDS_TARGET}. The first field also supports a # package name with a version range, in the form package>=1.2 # if a particular version is desired. line 810-820 # For test: # # TEST_TARGET - Target for sub-make in test stage. If not defined, # no default test target is provided. # Default: (none) # TEST_WRKSRC - Directory to do test in (default: ${WRKSRC}). # TEST_ENV - Additional environment vars passed to sub-make in test # stage # Default: ${MAKE_ENV} # TEST_ARGS - Any extra arguments to sub-make in test stage # Default: ${MAKE_ARGS} On Tue, 24 May 2022 15:27:09 +0000 (UTC) "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net> wrote: > On Sun, 22 May 2022, Stefan Esser wrote: > > > I'm not sure I understand the goal of your request. > > the goal is to cut down dependencies and build time. > > > > Do you want to have a switch that prevents the execution of tests when > > "make test" explicitly asks for the tests to be run??? > > > > This could easily be added to bsd.port.mk, but what for??? > > > >> What is the proper way to > >> $B".".".".(B(1) disable tests > > > > That's what I do not understand ... Tests are not run by default, and > > thus I never saw the need to disable them in any of my ports. > > > > Quite the opposite: If "make test" is invoked for a port that supports > > tests, I definitely want them to be executed. > > Right, so maybe solving (2) will solve (1) implicitly as I probably > don't have to disable them then using .ifdef bits. > > > >> and more important > >> $B".".".".(B(2) to amke sure the TEST_DEPENDS and not build in these cases? > > > > You can set "DO_MAKE_TEST=true" to execute the command "true" instead > > of "make" when bsd.port.mk wants to execute the tests. > > > > But this is an undocumented internal variable of the ports system, and > > it could be removed or renamed at any time, when changes are applied > > to bsd.port.mk. > > > > And you could override the TEST_DEPENDS macro instead of wrapping it > > into an .if block. > > how? putting > .if defined(TEST_DEPENDS) > .undef TEST_DEPENDS > .endif > or something like that in make.conf? > > > >> While I can iterate on port after port and apply a change like the below it > >> feels utterly wrong and it seems I am doing something silly here which has a > >> proper knob I cannot find? > > > > Please explain what you want to achieve. There may be other ways to > > achieve your goal, but I think I do not understand what your goal is ... > > Okay, for I have no idea anymore how long I've built the ports I need > in the classical way; I have a "meta port" depending on the 25 > packages I need to build. > > The problem has bcome that rather than simple builds the amounts of > ports build exploded. With that the addition of conflicts has also > exploded. something people do probably not see (anymore these days) > if their build depends conflict. > > One larger contributor to the explosion is TEST_DEPENDS. I'll give > you an example. > > cd dns/bind9 && env BATCH=yes NO_TEST= make all-depends-list > > Feel free to disable DNSTAP DOCS and MANPAGES (manually) to avoid > python for any of that (but there are different stories for another > time). > > Crazy, right? It comes from TEST_DEPENDS mostly. I still haven't all > tracked down which include stuff which is never even used. > > Sorry, the world is warm enough.. did we stop thinking again? > > > /bz > > -- > Bjoern A. Zeeb r15:7 -- Tomoaki AOKI <junchoon@dec.sakura.ne.jp>