summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorStefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>2024-12-09 11:31:55 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-12-20 16:18:59 +0000
commit243f9ea0600f3a125a9becaa32af298fc4b1b77d (patch)
treefb22e9c343d2346b880150e3818aa568e59cc665 /bitbake/lib
parent465872544eeb3db2fce53ef39f9250629d0f03a9 (diff)
downloadpoky-243f9ea0600f3a125a9becaa32af298fc4b1b77d.tar.gz
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 <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/tests/fetch.py13
1 files changed, 5 insertions, 8 deletions
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):
2838 bb.utils.mkdirhier(datadir) 2838 bb.utils.mkdirhier(datadir)
2839 with open(swfile, 'w') as f: 2839 with open(swfile, 'w') as f:
2840 json.dump(data, f) 2840 json.dump(data, f)
2841 # Also configure the S directory
2842 self.sdir = os.path.join(self.unpackdir, 'S')
2843 self.d.setVar('S', self.sdir)
2844 return swfile 2841 return swfile
2845 2842
2846 @skipIfNoNpm() 2843 @skipIfNoNpm()
@@ -2873,10 +2870,10 @@ class NPMTest(FetcherTest):
2873 self.assertTrue(os.path.exists(os.path.join(self.dldir, 'npm2', 'content-type-1.0.4.tgz'))) 2870 self.assertTrue(os.path.exists(os.path.join(self.dldir, 'npm2', 'content-type-1.0.4.tgz')))
2874 self.assertTrue(os.path.exists(os.path.join(self.dldir, 'git2', 'github.com.jshttp.cookie.git'))) 2871 self.assertTrue(os.path.exists(os.path.join(self.dldir, 'git2', 'github.com.jshttp.cookie.git')))
2875 fetcher.unpack(self.unpackdir) 2872 fetcher.unpack(self.unpackdir)
2876 self.assertTrue(os.path.exists(os.path.join(self.sdir, 'npm-shrinkwrap.json'))) 2873 self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'npm-shrinkwrap.json')))
2877 self.assertTrue(os.path.exists(os.path.join(self.sdir, 'node_modules', 'array-flatten', 'package.json'))) 2874 self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'node_modules', 'array-flatten', 'package.json')))
2878 self.assertTrue(os.path.exists(os.path.join(self.sdir, 'node_modules', 'array-flatten', 'node_modules', 'content-type', 'package.json'))) 2875 self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'node_modules', 'array-flatten', 'node_modules', 'content-type', 'package.json')))
2879 self.assertTrue(os.path.exists(os.path.join(self.sdir, 'node_modules', 'array-flatten', 'node_modules', 'content-type', 'node_modules', 'cookie', 'package.json'))) 2876 self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'node_modules', 'array-flatten', 'node_modules', 'content-type', 'node_modules', 'cookie', 'package.json')))
2880 2877
2881 @skipIfNoNpm() 2878 @skipIfNoNpm()
2882 @skipIfNoNetwork() 2879 @skipIfNoNetwork()
@@ -2999,7 +2996,7 @@ class NPMTest(FetcherTest):
2999 fetcher = bb.fetch.Fetch(['npmsw://' + swfile], self.d) 2996 fetcher = bb.fetch.Fetch(['npmsw://' + swfile], self.d)
3000 fetcher.download() 2997 fetcher.download()
3001 fetcher.unpack(self.unpackdir) 2998 fetcher.unpack(self.unpackdir)
3002 self.assertTrue(os.path.exists(os.path.join(self.sdir, 'node_modules', 'array-flatten', 'package.json'))) 2999 self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'node_modules', 'array-flatten', 'package.json')))
3003 3000
3004 @skipIfNoNpm() 3001 @skipIfNoNpm()
3005 @skipIfNoNetwork() 3002 @skipIfNoNetwork()