From nobody Fri Oct 20 17:47:30 2023 X-Original-To: dev-commits-src-all@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 4SBsVV587Dz4y2wJ; Fri, 20 Oct 2023 17:47:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SBsVV4YZ4z3WK8; Fri, 20 Oct 2023 17:47:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697824050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=esuWqVlDqXfVPs9HwjyM/malky9TCcP9vbgvOd8e9zg=; b=GGcmw8h5BYdS6pKOLoXpaFrvBFnh4gVeqFfT/WpDJ/tWMCaF6JU0473EiJy4UW2zKNHQe7 AXARC+K+6ldnpfo2Tpl1gwhbYrU5dElOgrrIRgWujMYaGOMavRvYar7o9H7vk7SUAgjRiG 9pDb9McZaYGlcEg4Rkv7xP2XlMZwx/60+ZZ0WcpyMOAYCRPUms3tWw+jA9AfIrjfXCs4nP 6iSqzbriawXGYf6RZeGY6W8J9MnHQv0bB9wxwj4yaPP1RRsCnxb5pqNvb2pJRN7+ANEj2F djWhz0dYtFMZ+5O8E1N6kn8FvipAiweXSSL0mPCgJQw1fSlVqeCdHzX+cKPZ1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697824050; a=rsa-sha256; cv=none; b=D55De5DTqbjA7vvVysLvotSpBLE8TyWQPhRjAZfsQi4SQhf+5cLu1Eiww7zYt94S5C2sdD ha5CMRkq+OSj7SC/xnvsbg38YHUIKo5pJ/1xwuXzQMIaETCR9saBU7XYvNx9Yr3J8ENOcn 9vI45S7rnQTQS2O3cD9TWLYbyZ2hD05HddB9Z7dB1YwVN8OShDqySaoZqXqX+SphdwJwTe IfsFzoz+xOxgT0cgX9nehFVwrfTgcz5OFCu4AgT/j7LX+o3T7usaWWwsPLg76NqBhRK9Ht UlE03QfwQiBIDz1HedAk6ComBvHgYn7KchjqDCNGSyLgk99whIRrcC2q/E/8kQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697824050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=esuWqVlDqXfVPs9HwjyM/malky9TCcP9vbgvOd8e9zg=; b=hA9NdyOEeDqiGv/ZqoqaKw30kfYxvGyFDCgjDQSDw0Xf1KmWQI+Qo/amKQ3g/OQPXuWsjK xD0+Kzmle4NpV5VtAp6c9OY+nsip9NFzuOqHNqHPo+pIvDLDk8KpnXqrkenjNvOkQcuO4S kMCvLV0iaIcYuSSXenkeL9ZZHw9xQMCk8AqIeZNnk3/M5EtP+vv0exMMGyMCfmkPXLFsKx tf5zTdHJIQyMILvjBFLDg5gJFFMNCW+OPHyF0WixlNHJ78g6DmYuEnVqK7YlC2dNWE4XPf JJeWx3fenioq/DjHX+M/H08svPcJtRnWZBIT79r4IK/HbLfOMbNzsU3EX5M2Ag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBsVV3c4tzjG4; Fri, 20 Oct 2023 17:47:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39KHlUnK005436; Fri, 20 Oct 2023 17:47:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39KHlUgB005433; Fri, 20 Oct 2023 17:47:30 GMT (envelope-from git) Date: Fri, 20 Oct 2023 17:47:30 GMT Message-Id: <202310201747.39KHlUgB005433@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 6120673f7566 - main - tests: fix ATF_TESTS_PYTEST no clean build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6120673f7566c35023921540d2d682572d1bf1ce Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=6120673f7566c35023921540d2d682572d1bf1ce commit 6120673f7566c35023921540d2d682572d1bf1ce Author: Gleb Smirnoff AuthorDate: 2023-10-20 17:47:08 +0000 Commit: Gleb Smirnoff CommitDate: 2023-10-20 17:47:08 +0000 tests: fix ATF_TESTS_PYTEST no clean build The hack with .xtmp file was effectively making the make to ignore changes to the sources, breaking NO_CLEAN builds. The hack can be actually omitted as setting SCRIPTSNAME_${_T} for every test is sufficient to prevent renaming by bsd.prog.mk. Reviewed by: melifaro Differential Revision: https://reviews.freebsd.org/D42283 --- share/mk/atf.test.mk | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/share/mk/atf.test.mk b/share/mk/atf.test.mk index 4b8ac8dedc27..bbc76b7fd97f 100644 --- a/share/mk/atf.test.mk +++ b/share/mk/atf.test.mk @@ -111,39 +111,19 @@ ${_T}: ${ATF_TESTS_KSH93_SRC_${_T}} .endif .if !empty(ATF_TESTS_PYTEST) -# bsd.prog.mk SCRIPTS interface removes file extension unless -# SCRIPTSNAME is set, which is not possible to do here. -# Workaround this by appending another extension (.xtmp) to the -# file name. Use separate loop to avoid dealing with explicitly -# stating expansion for each and every variable. -# -# ATF_TESTS_PYTEST -> contains list of files as is (test_something.py ..) -# _ATF_TESTS_PYTEST -> (test_something.py.xtmp ..) -# -# Former array is iterated to construct Kyuafile, where original file -# names need to be written. -# Latter array is iterated to enable bsd.prog.mk scripts framework - -# namely, installing scripts without .xtmp prefix. Note: this allows to -# not bother about the fact that make target needs to be different from -# the source file. -_TESTS+= ${ATF_TESTS_PYTEST} -_ATF_TESTS_PYTEST= +SCRIPTS+= ${ATF_TESTS_PYTEST} .for _T in ${ATF_TESTS_PYTEST} -_ATF_TESTS_PYTEST += ${_T}.xtmp +SCRIPTSDIR_${_T}= ${TESTSDIR} +SCRIPTSNAME_${_T}= ${_T} TEST_INTERFACE.${_T}= atf TEST_METADATA.${_T}+= required_programs="pytest" -.endfor - -SCRIPTS+= ${_ATF_TESTS_PYTEST} -.for _T in ${_ATF_TESTS_PYTEST} -SCRIPTSDIR_${_T}= ${TESTSDIR} CLEANFILES+= ${_T} ${_T}.tmp # TODO(jmmv): It seems to me that this SED and SRC functionality should # exist in bsd.prog.mk along the support for SCRIPTS. Move it there if # this proves to be useful within the tests. ATF_TESTS_PYTEST_SED_${_T}?= # empty -ATF_TESTS_PYTEST_SRC_${_T}?= ${.CURDIR}/${_T:S,.xtmp$,,} -${_T}: +ATF_TESTS_PYTEST_SRC_${_T}?= ${.CURDIR}/${_T} +${_T}: ${.CURDIR}/${_T} echo "#! /usr/libexec/atf_pytest_wrapper -P ${TESTSBASE}" > ${.TARGET}.tmp .if empty(ATF_TESTS_PYTEST_SED_${_T}) cat ${ATF_TESTS_PYTEST_SRC_${_T}} >>${.TARGET}.tmp