From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 06E4D42CA8; Tue, 13 Jun 2023 11:29:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D1B0440A8A; Tue, 13 Jun 2023 11:29:54 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id A869B40698 for ; Tue, 13 Jun 2023 11:29:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686648593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JMrSlBYjrCU+2G5E61QnYbvphF+8t1ak1Rc/1pSTJ3k=; b=g6yJBijZhGiLblYIyEnJUlYLkphexvVsRBOFi0znr6AlMTSy6TkshWB/oOAds8uHEbO+z8 xgtP+7bv3hnYof68wkW45Pz2/EkgD8toiJwPyXgOz0X2EFDDpXzQ7PolBfaHbhSOgpL/DH pmCcb/RwDDsuy/R2BJtxp/ao6VTPAKE= Received: from mail-oi1-f197.google.com (mail-oi1-f197.google.com [209.85.167.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-151-0VcDdpLdOZ25Euz0te0SMA-1; Tue, 13 Jun 2023 05:29:51 -0400 X-MC-Unique: 0VcDdpLdOZ25Euz0te0SMA-1 Received: by mail-oi1-f197.google.com with SMTP id 5614622812f47-39a19edd2abso3881204b6e.2 for ; Tue, 13 Jun 2023 02:29:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686648590; x=1689240590; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JMrSlBYjrCU+2G5E61QnYbvphF+8t1ak1Rc/1pSTJ3k=; b=P2MnwtMGwwOkNy5DrEpkLV/iWSyXuyw2Vs106+CezsVdD2mXHDkpztjlXydA96Ok9N RSCnJIdwQXBY9qnqrqxRW/b9Yx7+Xq3oJXnKdQ+FR3jtJK8Pb2zb3k3BUMUpq512Hveb 4d7SOhdP8tstWBck5ImDurPxnpnzu8Tm33ZSPJ/1xxzIX0rTmrRmR9WI7guutARf70ub h5+LrVt8QYaMgGI/raNS5nFgk/DuwLsgp3AuJGvLZSGl4z2wcnslyAnTWzhJgrNOtv1c pK2SuP3CXvxc/IqdhGRsA7Z0DXbB4FEr68PZ2urM78Y2p+r2D0OJ7ePb1Lo1siQwGAgT WeIw== X-Gm-Message-State: AC+VfDxgGmM8v7yTf2Eo+R2YSswf1QTduu4g+HlMmZpFd60718TER+mx SsYYjYfs1u5VwaBeTenR1M/pkz/D95dDK+UxVzHrIVWZu95bMx0r/sJVmke1O4pSXPQGpmGWxfr V/FYC0LS30AipdxSy4Pc= X-Received: by 2002:a05:6808:1489:b0:39a:aac4:4192 with SMTP id e9-20020a056808148900b0039aaac44192mr7822991oiw.17.1686648590261; Tue, 13 Jun 2023 02:29:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4+5lVRPJWcYLpqD1R76MG0fA4tMLXDKuSK6c4RVK8/QP+0SNYPNcN742rRhfl3oA+ZdOGVWtNvTSXk4DiCngg= X-Received: by 2002:a05:6808:1489:b0:39a:aac4:4192 with SMTP id e9-20020a056808148900b0039aaac44192mr7822981oiw.17.1686648590027; Tue, 13 Jun 2023 02:29:50 -0700 (PDT) MIME-Version: 1.0 References: <20230613081741.4083273-1-david.marchand@redhat.com> <20230613081741.4083273-4-david.marchand@redhat.com> In-Reply-To: From: David Marchand Date: Tue, 13 Jun 2023 11:29:39 +0200 Message-ID: Subject: Re: [PATCH 3/4] devtools: build all examples externally To: Bruce Richardson Cc: dev@dpdk.org, thomas@monjalon.net X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, Jun 13, 2023 at 11:21=E2=80=AFAM Bruce Richardson wrote: > > On Tue, Jun 13, 2023 at 10:17:40AM +0200, David Marchand wrote: > > So far, users of test-meson-builds.sh had to define their own set of > > examples to build externally. This is not that great because users need > > to maintain this list when examples are removed/added. > > > > Rework the script so that the 'all' value triggers an automatic > > discovery based on what was configured/compiled with meson/ninja. > > > > Signed-off-by: David Marchand > > --- > > devtools/test-meson-builds.sh | 14 ++++++++++++++ > > 1 file changed, 14 insertions(+) > > > > diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds= .sh > > index 9131088c9d..cab3373544 100755 > > --- a/devtools/test-meson-builds.sh > > +++ b/devtools/test-meson-builds.sh > > @@ -299,6 +299,20 @@ export PKG_CONFIG_PATH=3D$(dirname $pc_file):$PKG_= CONFIG_PATH > > libdir=3D$(dirname $(find $DESTDIR -name librte_eal.so)) > > export LD_LIBRARY_PATH=3D$libdir:$LD_LIBRARY_PATH > > examples=3D${DPDK_BUILD_TEST_EXAMPLES:-"cmdline helloworld l2fwd l3fwd= skeleton timer"} > > +if [ "$examples" =3D 'all' ]; then > > + examples=3D$(ninja -C $build_path -t targets all | grep 'examples= /.*:.*c_LINKER' | > > Since the build has already been done in $build_path at this point, would > it be easier to get the list of examples from "ls $build_path/examples/dp= dk-*"? Oh yes, it is more robust than parsing ninja targets. I'll look into it. > > + find $srcdir/examples -name Makefile | > > + sed -ne "s,$srcdir/examples/\([^/]*\)\ (/.*\|\)/$target/M= akefile,\1,p" > Scripts can be rather cryptic at times. I assume this sed statement is fo= r > handling examples which have subdirectories/are in subdirs. A comment > explaining this logic would be good. Indeed, I'll add a comment. --=20 David Marchand