From nobody Tue May 24 15:47:45 2022 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 694FC1AE9E88 for ; Tue, 24 May 2022 15:47:57 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from www121.sakura.ne.jp (www121.sakura.ne.jp [153.125.133.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4L6z9m1BHRz4t4h; Tue, 24 May 2022 15:47:55 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from kalamity.joker.local (123-1-111-80.area1b.commufa.jp [123.1.111.80]) (authenticated bits=0) by www121.sakura.ne.jp (8.16.1/8.16.1/[SAKURA-WEB]/20201212) with ESMTPA id 24OFlj70067265; Wed, 25 May 2022 00:47:46 +0900 (JST) (envelope-from junchoon@dec.sakura.ne.jp) Date: Wed, 25 May 2022 00:47:45 +0900 From: Tomoaki AOKI To: "Bjoern A. Zeeb" Cc: Stefan Esser , freebsd-ports@freebsd.org Subject: Re: NO_TEST, do-test: and TEST_DEPENDS? Message-Id: <20220525004745.c450cdce616b400836b2bb8d@dec.sakura.ne.jp> In-Reply-To: References: <848ba292-d306-dcd7-2456-383f1a3652f6@FreeBSD.org> Organization: Junchoon corps X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.0) List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4L6z9m1BHRz4t4h X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of junchoon@dec.sakura.ne.jp has no SPF policy when checking 153.125.133.21) smtp.mailfrom=junchoon@dec.sakura.ne.jp X-Spamd-Result: default: False [1.39 / 15.00]; RCVD_TLS_LAST(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[sakura.ne.jp]; AUTH_NA(1.00)[]; TO_DN_SOME(0.00)[]; HAS_ORG_HEADER(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[123.1.111.80:received]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.999]; NEURAL_SPAM_LONG(0.99)[0.987]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; MLMMJ_DEST(0.00)[freebsd-ports]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7684, ipnet:153.125.128.0/18, country:JP]; SUBJECT_ENDS_QUESTION(1.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N 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" 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 > >> 〓〓〓〓(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 > >> 〓〓〓〓(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