From 243f9ea0600f3a125a9becaa32af298fc4b1b77d Mon Sep 17 00:00:00 2001 From: Stefan Herbrechtsmeier Date: Mon, 9 Dec 2024 11:31:55 +0100 Subject: bitbake: tests: fetch: adapt npmsw tests to fixed unpack behavior Adapt the npmsw tests to commit 84f102954e10 ("fetch/npmsw: The fetcher shouldn't have any knowledge of S"). (Bitbake rev: 8194178291d9b47efb2079fe81b704ba6171efc1) Signed-off-by: Stefan Herbrechtsmeier Signed-off-by: Richard Purdie --- bitbake/lib/bb/tests/fetch.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'bitbake/lib') diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index 363f3a2185..01ca807247 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py @@ -2838,9 +2838,6 @@ class NPMTest(FetcherTest): bb.utils.mkdirhier(datadir) with open(swfile, 'w') as f: json.dump(data, f) - # Also configure the S directory - self.sdir = os.path.join(self.unpackdir, 'S') - self.d.setVar('S', self.sdir) return swfile @skipIfNoNpm() @@ -2873,10 +2870,10 @@ class NPMTest(FetcherTest): self.assertTrue(os.path.exists(os.path.join(self.dldir, 'npm2', 'content-type-1.0.4.tgz'))) self.assertTrue(os.path.exists(os.path.join(self.dldir, 'git2', 'github.com.jshttp.cookie.git'))) fetcher.unpack(self.unpackdir) - self.assertTrue(os.path.exists(os.path.join(self.sdir, 'npm-shrinkwrap.json'))) - self.assertTrue(os.path.exists(os.path.join(self.sdir, 'node_modules', 'array-flatten', 'package.json'))) - self.assertTrue(os.path.exists(os.path.join(self.sdir, 'node_modules', 'array-flatten', 'node_modules', 'content-type', 'package.json'))) - self.assertTrue(os.path.exists(os.path.join(self.sdir, 'node_modules', 'array-flatten', 'node_modules', 'content-type', 'node_modules', 'cookie', 'package.json'))) + self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'npm-shrinkwrap.json'))) + self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'node_modules', 'array-flatten', 'package.json'))) + self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'node_modules', 'array-flatten', 'node_modules', 'content-type', 'package.json'))) + self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'node_modules', 'array-flatten', 'node_modules', 'content-type', 'node_modules', 'cookie', 'package.json'))) @skipIfNoNpm() @skipIfNoNetwork() @@ -2999,7 +2996,7 @@ class NPMTest(FetcherTest): fetcher = bb.fetch.Fetch(['npmsw://' + swfile], self.d) fetcher.download() fetcher.unpack(self.unpackdir) - self.assertTrue(os.path.exists(os.path.join(self.sdir, 'node_modules', 'array-flatten', 'package.json'))) + self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'node_modules', 'array-flatten', 'package.json'))) @skipIfNoNpm() @skipIfNoNetwork() -- cgit v1.2.3-54-g00ecf