From owner-freebsd-ports@freebsd.org Sun May 14 10:37:50 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69C03D6C2A0 for ; Sun, 14 May 2017 10:37:50 +0000 (UTC) (envelope-from jjuanino@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 45471160C for ; Sun, 14 May 2017 10:37:50 +0000 (UTC) (envelope-from jjuanino@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 44AB5D6C29E; Sun, 14 May 2017 10:37:50 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44574D6C29C for ; Sun, 14 May 2017 10:37:50 +0000 (UTC) (envelope-from jjuanino@gmail.com) Received: from mail-wr0-x234.google.com (mail-wr0-x234.google.com [IPv6:2a00:1450:400c:c0c::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CC25B160A for ; Sun, 14 May 2017 10:37:49 +0000 (UTC) (envelope-from jjuanino@gmail.com) Received: by mail-wr0-x234.google.com with SMTP id w50so63532723wrc.0 for ; Sun, 14 May 2017 03:37:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=2O0aLTLFtvp9Lxyk8OgBoi0ZCp7KQjMcL0GETSyQaNE=; b=BsnN/HwB+IGOz/t19UcXzuRF/GCJPIiNcM4ATk0OeLXOmLlW8R/YpDwbIXptDnfkDm V+iztjXDhEgCg72TRB+MrJS0dcDxpUm/xyyPN5T4pdvTt3QNC+avwheXW6x/ovK0AzIv YZfE4tqSse5wdBKKZhVQoEM4tHSGxYv/++ikv4ZPxzr2P/0ZpDm3+ZKT5SH82Ex3puFs ijMb5aWiepfDzo8pptH76Fe0R1lm6cxPaCekUhvcT+kaShqkP57FNfrXx1XN5u5Iahk6 5jtfYJgGnx3Vyb5RqfTuWlyyt4ypWvyUEJXKnsyg9tWK45vgVhT6/+9tWhvwr9KfBHIE MR0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=2O0aLTLFtvp9Lxyk8OgBoi0ZCp7KQjMcL0GETSyQaNE=; b=T8z/u+pE3P3FFxQjztWmGYpRkHMgMJGDXTGv/A2JZu805ZNcataBmMrCJ7KkZXjt/b Lr0QWoyJQCj5HdAcpOS6VmunUJ11tSqXF/CMbJSzVByzqTxPNByrzoitT1zIevFghpix wrTl/TKpxBUiDb90wr7jnTZPVUZJl47ZjbTfXfrwTSlNkKx9yYwGsSLviwsNZotHywhl 9gRG2WEx0viqei87hhMGUc/I1gkU47IOQ62SKtIZZHgDdf+M29lz8jg061C11xNqcLKZ I30tTeHiDdrErDf07Z8eu+YhleUcWjiZMvgwKCdaF806LCUwokMv4mL7vzH3QzXZ4pi1 HU6w== X-Gm-Message-State: AODbwcAMvlGYktiKsxlrhDWx+gmcBGhz2LH9wdRMTbPPL9dfGUjX2u9h S2+0hXQ96VvJtYxU X-Received: by 10.223.175.209 with SMTP id y17mr691058wrd.77.1494758266856; Sun, 14 May 2017 03:37:46 -0700 (PDT) Received: from abel.home.inet (82.158.4.181.dyn.user.ono.com. [82.158.4.181]) by smtp.gmail.com with ESMTPSA id 72sm8028089wmx.23.2017.05.14.03.37.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 May 2017 03:37:46 -0700 (PDT) Date: Sun, 14 May 2017 12:37:45 +0200 From: =?iso-8859-1?Q?Jos=E9_G=2E?= Juanino To: ports@freebsd.org Subject: Re: Standard way to run test target in specific port Message-ID: <20170514103745.mnuvr3bvkrr2opdi@abel.home.inet> Mail-Followup-To: =?iso-8859-1?Q?Jos=E9_G=2E?= Juanino , ports@freebsd.org References: <20170514091325.76yi5rxb2a2tjs53@abel.home.inet> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170514091325.76yi5rxb2a2tjs53@abel.home.inet> X-Operating-System: FreeBSD 11.0-RELEASE-p2 User-Agent: NeoMutt/20161126 (1.7.1) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 10:37:50 -0000 El domingo 14 de mayo a las 11:13:25 CEST, José G. Juanino escribió: >Hello FreeBSD ports! > >I am porting a backup software (bup backup), and the upstream Makefile >has a "test" target. I find useful to make a port knob to allow run >such test (disabled by default). What is the best way to accomplish >that task? Is there any doc or "best practique" to watch for? > >I am thinking in write something like this: > > >RUNTEST_DESC= Run test suite # knob > >..... > >.if ${PORT_OPTIONS:MRUNTEST} >post-build: > ${GMAKE} ${MAKE_ARGS} -C ${WRKDIR}/${PORTNAME}-${PORTVERSION} test >.endif > > >But it seems very contrived and ugly. > > >You can find the full shar file in 219174 (with no test target >deployed). Hi again, I will try to answer to myself ... I have defined the "RUNTEST" knob in "OPTIONS_DEFINE" variable, and after: RUNTEST_VARS= TEST_TARGET=test The last line enable the "do-test" target properly when the knob is set (see bsd.port.mk system Makefile) But I do not know how to invoke automatically that target when user just run "make". Indeed I am thinking if really is a good idea to force the execution of "make test" by mean of the knob ... In some other ports I am seeing, this is enterelly optional. Regards -- José G. Juanino