From patchwork Fri Dec 20 11:25:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Herbrechtsmeier X-Patchwork-Id: 54447 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B416E77192 for ; Fri, 20 Dec 2024 11:26:41 +0000 (UTC) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (EUR05-DB8-obe.outbound.protection.outlook.com [40.107.20.118]) by mx.groups.io with SMTP id smtpd.web11.149744.1734693993154756588 for ; Fri, 20 Dec 2024 03:26:33 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@weidmueller.com header.s=selector2 header.b=bXZJQXfT; spf=pass (domain: weidmueller.com, ip: 40.107.20.118, mailfrom: stefan.herbrechtsmeier-oss@weidmueller.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=k7gT83QPELUNx/jFHit73ks08XqB09WO8xqAeKN94oVp5a0BVVgidWkp76UOOTbml0u2NeyzUduuUbAplmokmdf8XAxxWh8GjsaAShVcNkCB6gTAa/IQCCHX424kK1SXIOMSJuVVr9Lpno1C9++Ck5n9gHjm/MicYLA7y1Kv7CcObk6INrjTbxaCsRWv8Kd9tQ55fdmBREPPVLfkBVH/+vlkYt8Ho34XvrNDfqjds5qU1cJUIvw535jMtpxGrrM7s2bBHgc3eFlTncOmwEXQe8HkVhtF0FUYehVdhDVn0Ar4O9wWUENIzIeTATTUdVBzsQOwVpqQu/X5RNUknSJzPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tECYzinVbDQxMsSSm81qc/TD7t7q7X2mvyztaVAu010=; b=Om8y1Md/q+l3Z152K5wULO47awSn6wAVAPSF5jTh+hSFalx+/yM9e3lMK4+ih3LbKlPVda8dTn6ZQ9o87AfGmJpiN6vmHM1/rpUPN90/y8q8QZOfmThjuaw0TKwmZf+I1oRdHa9FQsbdGIsU6+F70XR82T6MXf+JkgPpdg9hiKNPtRWj5wMPCBs4ovBZh6qFNnN6LOWXep08Aw9jRl/VqEAUETrr7pIfoGUe5oqRihMShQwJp6OpoZ7Nyaf7J5afm9YYbTHuqMucGKfDcphdQNemOnieCVRwTxN7jHJA0uFvHvZ2QVY+kKrHNGF/+j7TAsZKH2tpSklKWU9JQ68kFA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=weidmueller.com; dmarc=pass action=none header.from=weidmueller.com; dkim=pass header.d=weidmueller.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=weidmueller.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tECYzinVbDQxMsSSm81qc/TD7t7q7X2mvyztaVAu010=; b=bXZJQXfTaJRPq3dzbOJxrfha5xezB62n6dTZYqEeW6iaTyC3L+sMOPmXER9S/eq47uGeWBbiIbhhQDXB9swAMYlV7NGcaD8IGbqVVmvNnY/3zXssEZK+bhZgwlkK/KF+2dqHH/bDyeJT4WsZ5ghSRLHgvhMztIljGCnKk1XLQPcqRgpFwCnWdMhuP1OD74T9Bu+MjfNXEXy5pu+An+R2t/I3qmGI0PuypATIdkkXrNL9irU2MvMC+xZ9F9WKvlEb47bWwgZmsoHCU3Z7B0AJcgZ/eQr6gYrpWGNij023Z8ir2niIdU8Mj3uEdXQPS05/DI7fT+/DrPZuwy75Ld1S8g== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=weidmueller.com; Received: from PAXPR08MB6969.eurprd08.prod.outlook.com (2603:10a6:102:1d8::23) by DU0PR08MB8256.eurprd08.prod.outlook.com (2603:10a6:10:410::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.14; Fri, 20 Dec 2024 11:26:25 +0000 Received: from PAXPR08MB6969.eurprd08.prod.outlook.com ([fe80::3b1:b329:1ed9:dad4]) by PAXPR08MB6969.eurprd08.prod.outlook.com ([fe80::3b1:b329:1ed9:dad4%3]) with mapi id 15.20.8272.013; Fri, 20 Dec 2024 11:26:25 +0000 From: Stefan Herbrechtsmeier To: bitbake-devel@lists.openembedded.org CC: Stefan Herbrechtsmeier Subject: [RFC PATCH 03/21] tests: fetch: replace [url] with urls for npm Date: Fri, 20 Dec 2024 12:25:54 +0100 Message-ID: <20241220112613.22647-4-stefan.herbrechtsmeier-oss@weidmueller.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241220112613.22647-1-stefan.herbrechtsmeier-oss@weidmueller.com> References: <20241220112613.22647-1-stefan.herbrechtsmeier-oss@weidmueller.com> X-ClientProxiedBy: FR0P281CA0106.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a8::7) To PAXPR08MB6969.eurprd08.prod.outlook.com (2603:10a6:102:1d8::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR08MB6969:EE_|DU0PR08MB8256:EE_ X-MS-Office365-Filtering-Correlation-Id: 2ad32487-4c16-456a-8537-08dd20e92373 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|52116014|1800799024|376014|38350700014; X-Microsoft-Antispam-Message-Info: s3sQEqh8SEv4A8HRNdW5RBsHt5EZ0RgPRPiXkuuzYXoIncyvy2SjJwz7/2TBq1x+i/UoYiQUQrvEBRJkX6OQi8hOugftrhnB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zQtUewC+Y7P2Ew1JwYjQPNcVv/YBkqNxfzqi/cblKLmHVdFmJvIdQx8FcZzVVnupzGGg4Rl3bPbeevmx77Z7tedq5BOgJEBfzHOv+owrd/p4rBFYfa8zJD9d6g/B7IY9bt/4HfYak48d3iMrh4eEK2bu7h6ashdCUc/Q9hWfpbjnv5Yuhna1CZV/VFRwkIhsFGfL8YuOZZb/kC5hZYS4HMECORkZeR0IfYSi+HbSHRYRxPfkbSC7I2gI3hhHREsMhm73G6Bo2sxrJcWkw3UPAReD9ZNiAz+Pse512nnmRCtr9 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR08MB6969.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(52116014)(1800799024)(376014)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: E1sUap5oPuFP+LfqJy71/NVxeAdP0pHHLLPFpqwbHQUOgL3J4aKHZoHEfgqDSkylJb8daf62azJzqmqJ07WqmWui6isahjetFmzfV1L0ezx0wuNwEhaNg053fi9Fx7eUYMYRn2SMlCKu9oxKa2lTEXfnYLMYOL0zEjnRv3hirBsUlMgHE5JlGEOi/vbxPIqEe+eGmsDyzflEGUVRIOHRjiMFY9GH8cHVllop24urrpu35eagcTmHEr/Mlj9VVQXfCSf2xE0v5YHZ2lY1Elqj0oNYS04mjZU6x77h7MXVojeaXPT3Iy3Cg/cYmWNKZ/oCqozk60xDBcRM2jlkYOoZq9VSEuwlpI/5bPuxtMTHDebaN8YiHUFFLW/Rgmamg4IDSqkhPGL7RafcI/GricTaxt98jk/nKn2Ym5pcmTW2+oNXOX7uJTp6aVbjmVN1gByw3qlVMIQJp8ycGXHS3v63dJbeG9qn7OKAInuwU4GPtmB8y7TLa+L+rGogRgjNFflqoFcPWPBB6d31Lwc2gsKQN2UoKeK5LQxGSf3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weidmueller.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2ad32487-4c16-456a-8537-08dd20e92373 X-MS-Exchange-CrossTenant-AuthSource: PAXPR08MB6969.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2024 11:26:25.1848 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e4289438-1c5f-4c95-a51a-ee553b8b18ec X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jID07k0939LSwM/W3bgsLddUAnh7IHzb1ntanmjaJaAntZGzWtp4+LvzaDANR2TwAkhizCroEijV/iIM9P7C1Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8256 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 20 Dec 2024 11:26:41 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/16923 From: Stefan Herbrechtsmeier Replace [url] with urls to simplify future modifications. Signed-off-by: Stefan Herbrechtsmeier --- lib/bb/tests/fetch.py | 66 +++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py index b89348236..c5ec84dc5 100644 --- a/lib/bb/tests/fetch.py +++ b/lib/bb/tests/fetch.py @@ -2627,8 +2627,8 @@ class NPMTest(FetcherTest): @skipIfNoNpm() @skipIfNoNetwork() def test_npm(self): - url = 'npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=1.0.0' - fetcher = bb.fetch.Fetch([url], self.d) + urls = ['npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=1.0.0'] + fetcher = bb.fetch.Fetch(urls, self.d) ud = fetcher.ud[fetcher.urls[0]] fetcher.download() self.assertTrue(os.path.exists(ud.localpath)) @@ -2641,9 +2641,9 @@ class NPMTest(FetcherTest): @skipIfNoNpm() @skipIfNoNetwork() def test_npm_bad_checksum(self): - url = 'npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=1.0.0' + urls = ['npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=1.0.0'] # Fetch once to get a tarball - fetcher = bb.fetch.Fetch([url], self.d) + fetcher = bb.fetch.Fetch(urls, self.d) ud = fetcher.ud[fetcher.urls[0]] fetcher.download() self.assertTrue(os.path.exists(ud.localpath)) @@ -2660,9 +2660,9 @@ class NPMTest(FetcherTest): @skipIfNoNpm() @skipIfNoNetwork() def test_npm_premirrors(self): - url = 'npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=1.0.0' + urls = ['npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=1.0.0'] # Fetch once to get a tarball - fetcher = bb.fetch.Fetch([url], self.d) + fetcher = bb.fetch.Fetch(urls, self.d) ud = fetcher.ud[fetcher.urls[0]] fetcher.download() self.assertTrue(os.path.exists(ud.localpath)) @@ -2682,7 +2682,7 @@ class NPMTest(FetcherTest): # while the fetcher object exists, which it does when we rename the # download directory to "mirror" above. Thus we need a new fetcher to go # with the now empty download directory. - fetcher = bb.fetch.Fetch([url], self.d) + fetcher = bb.fetch.Fetch(urls, self.d) ud = fetcher.ud[fetcher.urls[0]] fetcher.download() self.assertTrue(os.path.exists(ud.localpath)) @@ -2690,9 +2690,9 @@ class NPMTest(FetcherTest): @skipIfNoNpm() @skipIfNoNetwork() def test_npm_premirrors_with_specified_filename(self): - url = 'npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=1.0.0' + urls = ['npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=1.0.0'] # Fetch once to get a tarball - fetcher = bb.fetch.Fetch([url], self.d) + fetcher = bb.fetch.Fetch(urls, self.d) ud = fetcher.ud[fetcher.urls[0]] fetcher.download() self.assertTrue(os.path.exists(ud.localpath)) @@ -2712,8 +2712,8 @@ class NPMTest(FetcherTest): @skipIfNoNetwork() def test_npm_mirrors(self): # Fetch once to get a tarball - url = 'npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=1.0.0' - fetcher = bb.fetch.Fetch([url], self.d) + urls = ['npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=1.0.0'] + fetcher = bb.fetch.Fetch(urls, self.d) ud = fetcher.ud[fetcher.urls[0]] fetcher.download() self.assertTrue(os.path.exists(ud.localpath)) @@ -2737,8 +2737,8 @@ class NPMTest(FetcherTest): @skipIfNoNpm() @skipIfNoNetwork() def test_npm_destsuffix_downloadfilename(self): - url = 'npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=1.0.0;destsuffix=foo/bar;downloadfilename=foo-bar.tgz' - fetcher = bb.fetch.Fetch([url], self.d) + urls = ['npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=1.0.0;destsuffix=foo/bar;downloadfilename=foo-bar.tgz'] + fetcher = bb.fetch.Fetch(urls, self.d) fetcher.download() self.assertTrue(os.path.exists(os.path.join(self.dldir, 'npm2', 'foo-bar.tgz'))) fetcher.unpack(self.unpackdir) @@ -2746,18 +2746,18 @@ class NPMTest(FetcherTest): self.assertTrue(os.path.exists(os.path.join(unpackdir, 'package.json'))) def test_npm_no_network_no_tarball(self): - url = 'npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=1.0.0' + urls = ['npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=1.0.0'] self.d.setVar('BB_NO_NETWORK', '1') - fetcher = bb.fetch.Fetch([url], self.d) + fetcher = bb.fetch.Fetch(urls, self.d) with self.assertRaises(bb.fetch2.NetworkAccess): fetcher.download() @skipIfNoNpm() @skipIfNoNetwork() def test_npm_no_network_with_tarball(self): - url = 'npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=1.0.0' + urls = ['npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=1.0.0'] # Fetch once to get a tarball - fetcher = bb.fetch.Fetch([url], self.d) + fetcher = bb.fetch.Fetch(urls, self.d) fetcher.download() # Disable network access self.d.setVar('BB_NO_NETWORK', '1') @@ -2770,8 +2770,8 @@ class NPMTest(FetcherTest): @skipIfNoNpm() @skipIfNoNetwork() def test_npm_registry_alternate(self): - url = 'npm://skimdb.npmjs.com;package=@savoirfairelinux/node-server-example;version=1.0.0' - fetcher = bb.fetch.Fetch([url], self.d) + urls = ['npm://skimdb.npmjs.com;package=@savoirfairelinux/node-server-example;version=1.0.0'] + fetcher = bb.fetch.Fetch(urls, self.d) fetcher.download() fetcher.unpack(self.unpackdir) unpackdir = os.path.join(self.unpackdir, 'npm') @@ -2780,8 +2780,8 @@ class NPMTest(FetcherTest): @skipIfNoNpm() @skipIfNoNetwork() def test_npm_version_latest(self): - url = 'npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=latest' - fetcher = bb.fetch.Fetch([url], self.d) + url = ['npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=latest'] + fetcher = bb.fetch.Fetch(urls, self.d) fetcher.download() fetcher.unpack(self.unpackdir) unpackdir = os.path.join(self.unpackdir, 'npm') @@ -2790,46 +2790,46 @@ class NPMTest(FetcherTest): @skipIfNoNpm() @skipIfNoNetwork() def test_npm_registry_invalid(self): - url = 'npm://registry.invalid.org;package=@savoirfairelinux/node-server-example;version=1.0.0' - fetcher = bb.fetch.Fetch([url], self.d) + urls = ['npm://registry.invalid.org;package=@savoirfairelinux/node-server-example;version=1.0.0'] + fetcher = bb.fetch.Fetch(urls, self.d) with self.assertRaises(bb.fetch2.FetchError): fetcher.download() @skipIfNoNpm() @skipIfNoNetwork() def test_npm_package_invalid(self): - url = 'npm://registry.npmjs.org;package=@savoirfairelinux/invalid;version=1.0.0' - fetcher = bb.fetch.Fetch([url], self.d) + urls = ['npm://registry.npmjs.org;package=@savoirfairelinux/invalid;version=1.0.0'] + fetcher = bb.fetch.Fetch(urls, self.d) with self.assertRaises(bb.fetch2.FetchError): fetcher.download() @skipIfNoNpm() @skipIfNoNetwork() def test_npm_version_invalid(self): - url = 'npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=invalid' + urls = ['npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=invalid'] with self.assertRaises(bb.fetch2.ParameterError): - fetcher = bb.fetch.Fetch([url], self.d) + fetcher = bb.fetch.Fetch(urls, self.d) @skipIfNoNpm() @skipIfNoNetwork() def test_npm_registry_none(self): - url = 'npm://;package=@savoirfairelinux/node-server-example;version=1.0.0' + urls = ['npm://;package=@savoirfairelinux/node-server-example;version=1.0.0'] with self.assertRaises(bb.fetch2.MalformedUrl): - fetcher = bb.fetch.Fetch([url], self.d) + fetcher = bb.fetch.Fetch(urls, self.d) @skipIfNoNpm() @skipIfNoNetwork() def test_npm_package_none(self): - url = 'npm://registry.npmjs.org;version=1.0.0' + urls = ['npm://registry.npmjs.org;version=1.0.0'] with self.assertRaises(bb.fetch2.MissingParameterError): - fetcher = bb.fetch.Fetch([url], self.d) + fetcher = bb.fetch.Fetch(urls, self.d) @skipIfNoNpm() @skipIfNoNetwork() def test_npm_version_none(self): - url = 'npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example' + urls = ['npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example'] with self.assertRaises(bb.fetch2.MissingParameterError): - fetcher = bb.fetch.Fetch([url], self.d) + fetcher = bb.fetch.Fetch(urls, self.d) def create_shrinkwrap_file(self, data): import json