From nobody Tue Aug 29 11:08:31 2023 X-Original-To: dev-commits-doc-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 4RZl674GJwz4rgB5 for ; Tue, 29 Aug 2023 11:08:31 +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 4RZl673mGzz4kPS; Tue, 29 Aug 2023 11:08:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693307311; 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=sYVTSHfvmUbBuc/WMxB21RSAoWGZWZE2fdTmvCMdfO8=; b=SrPYuPwnrVWoRE5olZBEaJRIP/Dzk3RSN/mMtkLEi90dash6NtW1OEOJfNe4Hhk1m4z208 dY4a4M9y5BpCMx1xa1FlZgpbZjVoxAb5TPuK3Q+jIhNE2Ma7V29Dee+A33JaSb4d1zCRUM 2bIvrGsSTfUPAEs6sKMHGSepLz/uOaGLieo0VUflcDT+qkjAFcEDNpFTSUZOk6gj3GGgU2 jeCKvlxhONRVIi8H2NT27eF9qKW7z/hLxcK3yDRv2tIYOXr0hnXm3czGAFaKopFQ8/hr4n 7b6EBtUs0bwuOI6GxTE+qCsKWSGNtnC3r1KGKkO6vAiTcEWMz1GFxJ8rOT9S5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693307311; a=rsa-sha256; cv=none; b=IA/blzs7g/48DOVrD/iI9VsHubUZePp+gktR0kGKT3WXlmM2xCDpPfyo3pWQLqd3w63UDY E7WgJMI6A8bscKPk7PvCv6F2MpbgNpcv5er0zCsB/eWwlwwZjpWCH/lSA/puns3mavo7Su SNKJ9jZSCyUg9sHZHAJYi+gYaV8T4s9mLhKB3Y8Lzt9hjN8weFN8KZNCR9fhljQ7DyTuiv NR4sai1sVXc4kxnSmZ8tRz8cBFMAQ1ImRPMPBCog+C+fC35lmQgP9sIGECbXvTDlP3WY/0 pkAFLSaT0sQ60NtINUCEdKwW4LSAsQXuWB90wK92gOMY9FfhSO/abosUYYAFHw== 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=1693307311; 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=sYVTSHfvmUbBuc/WMxB21RSAoWGZWZE2fdTmvCMdfO8=; b=osHCLAixGqMwR9hnmHRugchm4Gdciv7Xtg2WRn83527Iu16encAHnO6sAyt24kYvOXfzNI X6erCTNUE4Ikprsou8Ui1inhsRQa/KAdM07uPVSRlXcwixGpMLiv2uLX8fgPFbTY4CURc1 IkRIO0biqX2dF53KOzbIUm/n3eAHPK1jc7rtZvsF0dflRrqlK3sp9YO7cS9xJuDXzGpNFN vWQyZ0QFw2XmSm+M0UfA+pC3FrMS1meFu1KS37Rj0yYaLnkd7Dq6qNy6CMfddYxtL9cPKi EKmqbOs26A7x7HVdLs0Jr1c5F+WWgG6m+TezhMPqMwFBFv1DGTiroKjmw/dm/Q== 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 4RZl672YHtzpt4; Tue, 29 Aug 2023 11:08:31 +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 37TB8VnG027884; Tue, 29 Aug 2023 11:08:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37TB8VIf027881; Tue, 29 Aug 2023 11:08:31 GMT (envelope-from git) Date: Tue, 29 Aug 2023 11:08:31 GMT Message-Id: <202308291108.37TB8VIf027881@gitrepo.freebsd.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: Fernando =?utf-8?Q?Apestegu=C3=ADa?= Subject: git: becd110894 - main - [phb]: Document make test List-Id: Commit messages for all branches of the doc repository List-Archive: https://lists.freebsd.org/archives/dev-commits-doc-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-doc-all@freebsd.org X-BeenThere: dev-commits-doc-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: becd110894c01e81dc9ad451ab34765cf9bf2f86 Auto-Submitted: auto-generated The branch main has been updated by fernape: URL: https://cgit.FreeBSD.org/doc/commit/?id=becd110894c01e81dc9ad451ab34765cf9bf2f86 commit becd110894c01e81dc9ad451ab34765cf9bf2f86 Author: Fernando ApesteguĂ­a AuthorDate: 2023-08-28 11:48:01 +0000 Commit: Fernando ApesteguĂ­a CommitDate: 2023-08-29 11:07:05 +0000 [phb]: Document make test Along with the relevant variables. PR: 248678 Reported by: diizzy@ Reviewed by: carlavilla@, ceri@ Differential Revision: https://reviews.freebsd.org/D41626 --- .../en/books/porters-handbook/testing/_index.adoc | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/documentation/content/en/books/porters-handbook/testing/_index.adoc b/documentation/content/en/books/porters-handbook/testing/_index.adoc index 2efafe01e4..6f326f6ac8 100644 --- a/documentation/content/en/books/porters-handbook/testing/_index.adoc +++ b/documentation/content/en/books/porters-handbook/testing/_index.adoc @@ -65,6 +65,35 @@ See [.filename]#bsd.port.mk# for the meaning of the string produced. Also note that running a recent version of `portlint` (as specified in the next section) will cause `make describe` to be run automatically. +[[make-test]] +== Running `make test` + +Even if the port builds fine, it is a good idea to ensure that the software +correctly does what it is supposed to do. +If the original upstream project provides tests along with the software, it is a +good idea to run them and check everything works as expected. + +A port can enable tests automatically by using the `TEST_TARGET` variable. +When set, this variable contains the name of the testing target of the port. +This is usually just `test` but other names include `tests`, `check` or for +specific cases things like `run_tests.py`. + +In addition to the `TEST_TARGET` variable the framework provides the following +variables to control the tests execution: + +* `TEST_WRKSRC` is the directory to do the tests in. +* `TEST_ENV` contains additional variables to be passed to the test stage. +* `TEST_ARGS` contains any extra arguments passed to the test stage. + +Examples of use of these variables can be found in package:cad/xyce[], +package:www/libjwt[] and others. + +[NOTE] +==== +Please make sure that tests do not break when updating a port. +==== + + [[testing-portclippy]] == Portclippy / Portfmt