From 706d5aacd7ab7b37c00df1a1b210e4ced06119e1 Mon Sep 17 00:00:00 2001 From: Andrew Geissler Date: Fri, 12 Feb 2021 15:55:30 -0600 Subject: Reset poky to before our libpam hacks Things got a bit out of synch with openbmc-config due to the libpam issues and the migration from the meta-* layers. Revert the two previous commits and then put the latest poky in with the libpam revert and get openbmc-config right again. Revert "Revert "libpam: update 1.3.1 -> 1.5.1"" This reverts commit 87ddd3eab4df68e624b5350ccaab28b3b97547c0. Revert "poky: subtree update:796be0593a..10c69538c0" This reverts commit c723b72979bfac6362509cf1fe086900f6641f28. Change-Id: I3a1f405193aee6a21fe0cd24be9927c143a23d9a Signed-off-by: Andrew Geissler --- poky/bitbake/lib/bb/tests/fetch.py | 92 +++++++++++--------------------------- 1 file changed, 27 insertions(+), 65 deletions(-) (limited to 'poky/bitbake/lib/bb/tests') diff --git a/poky/bitbake/lib/bb/tests/fetch.py b/poky/bitbake/lib/bb/tests/fetch.py index 1452d7615..da17d7f28 100644 --- a/poky/bitbake/lib/bb/tests/fetch.py +++ b/poky/bitbake/lib/bb/tests/fetch.py @@ -654,58 +654,6 @@ class FetcherLocalTest(FetcherTest): with self.assertRaises(bb.fetch2.UnpackError): self.fetchUnpack(['file://a;subdir=/bin/sh']) - def test_local_gitfetch_usehead(self): - # Create dummy local Git repo - src_dir = tempfile.mkdtemp(dir=self.tempdir, - prefix='gitfetch_localusehead_') - src_dir = os.path.abspath(src_dir) - bb.process.run("git init", cwd=src_dir) - bb.process.run("git commit --allow-empty -m'Dummy commit'", - cwd=src_dir) - # Use other branch than master - bb.process.run("git checkout -b my-devel", cwd=src_dir) - bb.process.run("git commit --allow-empty -m'Dummy commit 2'", - cwd=src_dir) - stdout = bb.process.run("git rev-parse HEAD", cwd=src_dir) - orig_rev = stdout[0].strip() - - # Fetch and check revision - self.d.setVar("SRCREV", "AUTOINC") - url = "git://" + src_dir + ";protocol=file;usehead=1" - fetcher = bb.fetch.Fetch([url], self.d) - fetcher.download() - fetcher.unpack(self.unpackdir) - stdout = bb.process.run("git rev-parse HEAD", - cwd=os.path.join(self.unpackdir, 'git')) - unpack_rev = stdout[0].strip() - self.assertEqual(orig_rev, unpack_rev) - - def test_local_gitfetch_usehead_withname(self): - # Create dummy local Git repo - src_dir = tempfile.mkdtemp(dir=self.tempdir, - prefix='gitfetch_localusehead_') - src_dir = os.path.abspath(src_dir) - bb.process.run("git init", cwd=src_dir) - bb.process.run("git commit --allow-empty -m'Dummy commit'", - cwd=src_dir) - # Use other branch than master - bb.process.run("git checkout -b my-devel", cwd=src_dir) - bb.process.run("git commit --allow-empty -m'Dummy commit 2'", - cwd=src_dir) - stdout = bb.process.run("git rev-parse HEAD", cwd=src_dir) - orig_rev = stdout[0].strip() - - # Fetch and check revision - self.d.setVar("SRCREV", "AUTOINC") - url = "git://" + src_dir + ";protocol=file;usehead=1;name=newName" - fetcher = bb.fetch.Fetch([url], self.d) - fetcher.download() - fetcher.unpack(self.unpackdir) - stdout = bb.process.run("git rev-parse HEAD", - cwd=os.path.join(self.unpackdir, 'git')) - unpack_rev = stdout[0].strip() - self.assertEqual(orig_rev, unpack_rev) - class FetcherNoNetworkTest(FetcherTest): def setUp(self): super().setUp() @@ -896,21 +844,35 @@ class FetcherNetworkTest(FetcherTest): self.assertRaises(bb.fetch.FetchError, self.gitfetcher, url1, url2) @skipIfNoNetwork() - def test_gitfetch_usehead(self): - # Since self.gitfetcher() sets SRCREV we expect this to override - # `usehead=1' and instead fetch the specified SRCREV. See - # test_local_gitfetch_usehead() for a positive use of the usehead - # feature. - url = "git://git.openembedded.org/bitbake;usehead=1" - self.assertRaises(bb.fetch.ParameterError, self.gitfetcher, url, url) + def test_gitfetch_localusehead(self): + # Create dummy local Git repo + src_dir = tempfile.mkdtemp(dir=self.tempdir, + prefix='gitfetch_localusehead_') + src_dir = os.path.abspath(src_dir) + bb.process.run("git init", cwd=src_dir) + bb.process.run("git commit --allow-empty -m'Dummy commit'", + cwd=src_dir) + # Use other branch than master + bb.process.run("git checkout -b my-devel", cwd=src_dir) + bb.process.run("git commit --allow-empty -m'Dummy commit 2'", + cwd=src_dir) + stdout = bb.process.run("git rev-parse HEAD", cwd=src_dir) + orig_rev = stdout[0].strip() + + # Fetch and check revision + self.d.setVar("SRCREV", "AUTOINC") + url = "git://" + src_dir + ";protocol=file;usehead=1" + fetcher = bb.fetch.Fetch([url], self.d) + fetcher.download() + fetcher.unpack(self.unpackdir) + stdout = bb.process.run("git rev-parse HEAD", + cwd=os.path.join(self.unpackdir, 'git')) + unpack_rev = stdout[0].strip() + self.assertEqual(orig_rev, unpack_rev) @skipIfNoNetwork() - def test_gitfetch_usehead_withname(self): - # Since self.gitfetcher() sets SRCREV we expect this to override - # `usehead=1' and instead fetch the specified SRCREV. See - # test_local_gitfetch_usehead() for a positive use of the usehead - # feature. - url = "git://git.openembedded.org/bitbake;usehead=1;name=newName" + def test_gitfetch_remoteusehead(self): + url = "git://git.openembedded.org/bitbake;usehead=1" self.assertRaises(bb.fetch.ParameterError, self.gitfetcher, url, url) @skipIfNoNetwork() -- cgit v1.2.3