From nobody Sun Oct 22 17:14:48 2023 X-Original-To: dev-commits-src-main@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 4SD4gr5GJkz4xZR7; Sun, 22 Oct 2023 17:14:48 +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 4SD4gr4j6mz4d0j; Sun, 22 Oct 2023 17:14:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697994888; 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=lCnj0/h7KNJmKG6Wg8jWrW7hJkxxandbG7K2Cmb+OKM=; b=jz6hVGngPDaK5QSk6IpkDmX+1mNV9Az8CEMj7614WxWcSCYChFq1aZ6kkUfuGQWejtKZIT c583gi4vmzY+bXYOTl2LvtechZV/8qNMY8MadZTWX4uzNVNJoEPCv83/hIeQ8BYjoZNJ5B GzMpTyUia2YhoSxC0iYzK9RA6OdNEw1kFPbXnKmh4P3tF7BVEGYcfpq6xIe2B60R28HAqb dIR6hbTPA/z2dc+XIliSRukjRlokAlVb4WM39zOoXxMlS7XPQUowtCWiaHtVa7Zh9yvHYk SsCoMwCCSaMn0pTmc23rZirUcR8/ie1XaUzIhvHHTM0j78CESZJc5+MXOtITtQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697994888; a=rsa-sha256; cv=none; b=Ltt22SWeydgtoVLohZIJHJ1+WFEMqxIeDy/qAGeZOywg91S5jS4UeWTJBTkVnazM1Hu/OL 3XC89KYl84516y7yq9IlcL1n3Iwfu4Mo/Od6pWrqCHn4OAxxgjZju/4UgXroHgNwgB8syM xjQXKD7p1YP3vbtcuLxNv+BuRr05G2YPVVLD32qvCSO62Xnkl00euQpUEca4b2r4JxacYc uBZ8vyNHZSFdt4SHf7ECiUPCfQw7Aq3J5BmLiJWJq/X8dqG0SwauM5zPshf/u8UQbJWXpi bGy9t0yPju28Ufgqwb7Dnh63gUg5LHbZkT+VssDruohBCUNVlDx4lhfbSJ30dQ== 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=1697994888; 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=lCnj0/h7KNJmKG6Wg8jWrW7hJkxxandbG7K2Cmb+OKM=; b=gYlsZZSCPP5ry05B+QDYUj/SqruYLE3/8f+lt2DvZPuXTFsZufeUHKVwfjkLefilz0L5LY HjPZVQrcmv2AHQZ2EwhrcdbwQ7SuWUHUMMQ6zJEWnGqNUbT5NWFLFEhxX0yYvEzI9DxqcK f6kUJx69IUKfZf7Jh83+w8rUTsC8G50VyA41ll67HIhv750ui7LB2hYxmmGxHZ2y+KTrPe tAYDWjZnhGPyZwzrwCijnYtYJE4yiP4XiFKRHbgbr/hvAyR6ZKRmK7gAG2M1JDbFzYNrni irUsxO4GHiSyVR4zzV+nxNjeXRP/gKLRT0UXQG/BhNEeuPLXMBHf4YFVhuWljQ== 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 4SD4gr3lVFz15V2; Sun, 22 Oct 2023 17:14:48 +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 39MHEmpV050647; Sun, 22 Oct 2023 17:14:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39MHEmrN050644; Sun, 22 Oct 2023 17:14:48 GMT (envelope-from git) Date: Sun, 22 Oct 2023 17:14:48 GMT Message-Id: <202310221714.39MHEmrN050644@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: e8f035763083 - main - Revert "tests: fix ATF_TESTS_PYTEST no clean build" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e8f035763083c902a54e91f1999daaec628e9ebf Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e8f035763083c902a54e91f1999daaec628e9ebf commit e8f035763083c902a54e91f1999daaec628e9ebf Author: Mark Johnston AuthorDate: 2023-10-22 17:13:31 +0000 Commit: Mark Johnston CommitDate: 2023-10-22 17:14:13 +0000 Revert "tests: fix ATF_TESTS_PYTEST no clean build" This reverts commit 6120673f7566c35023921540d2d682572d1bf1ce, which appears to break a clean buildworld. --- share/mk/atf.test.mk | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/share/mk/atf.test.mk b/share/mk/atf.test.mk index bbc76b7fd97f..4b8ac8dedc27 100644 --- a/share/mk/atf.test.mk +++ b/share/mk/atf.test.mk @@ -111,19 +111,39 @@ ${_T}: ${ATF_TESTS_KSH93_SRC_${_T}} .endif .if !empty(ATF_TESTS_PYTEST) -SCRIPTS+= ${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= .for _T in ${ATF_TESTS_PYTEST} -SCRIPTSDIR_${_T}= ${TESTSDIR} -SCRIPTSNAME_${_T}= ${_T} +_ATF_TESTS_PYTEST += ${_T}.xtmp 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} -${_T}: ${.CURDIR}/${_T} +ATF_TESTS_PYTEST_SRC_${_T}?= ${.CURDIR}/${_T:S,.xtmp$,,} +${_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