selftest: fix path assumption
cover selftest: fix path assumption
The following changes since commit 840e221ea7c35177fda37af618c4727fa7754789:
bitbake: event: Replace slightly elderly bbmake references! (2017-01-09 13:39:13 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib ChenQi/selftest-path-assumption
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/selftest-path-assumption
Chen Qi (2):
selftest/bbtests.py: fix path assumption for LICENSE_DIRECTORY selftest/buildoptions.py: fix path assumption for DEPLOY_DIR_SRC
meta/lib/oeqa/selftest/bbtests.py | 5 +++-- meta/lib/oeqa/selftest/buildoptions.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/2 selftest/bbtests.py: fix path assumption for LICENSE_DIRECTORY
Fix path assumption for LICENSE_DIRECTORY, otherwise, the test case may fail even if the functionality it tests works well.
--- meta/lib/oeqa/selftest/bbtests.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
meta/lib/oeqa/selftest/bbtests.py +3 -2
@@ -235,8 +235,9 @@ INHERIT_remove = \"report-error\" self.addCleanup(ftools.remove_from_file, conf ,data) result = bitbake('readline', ignore_status=True) self.assertEqual(result.status, 0, "Bitbake failed, exit code %s, output %s" % (result.status, result.output)) - self.assertFalse(os.path.isfile(os.path.join(self.builddir, 'tmp/deploy/licenses/readline/generic_GPLv3'))) - self.assertTrue(os.path.isfile(os.path.join(self.builddir, 'tmp/deploy/licenses/readline/generic_GPLv2'))) + lic_dir = get_bb_var('LICENSE_DIRECTORY') + self.assertFalse(os.path.isfile(os.path.join(lic_dir, 'readline/generic_GPLv3'))) + self.assertTrue(os.path.isfile(os.path.join(lic_dir, 'readline/generic_GPLv2'))) @testcase(1422) def test_setscene_only(self):
Signature · 1 line
1.9.1
PATCH 2/2 selftest/buildoptions.py: fix path assumption for DEPLOY_DIR_SRC
In reply to Chen QiFix path assumption for DEPLOY_DIR_SRC, otherwise, the testcase may fail even if the functionality works well.
--- meta/lib/oeqa/selftest/buildoptions.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
meta/lib/oeqa/selftest/buildoptions.py +3 -2
@@ -197,7 +197,8 @@ class ArchiverTest(oeSelfTest): self.write_config("INHERIT += \"archiver\"\nARCHIVER_MODE[src] = \"original\"\nARCHIVER_MODE[srpm] = \"1\"") res = bitbake("xcursor-transparent-theme", ignore_status=True) self.assertEqual(res.status, 0, "\nCouldn't build xcursortransparenttheme.\nbitbake output %s" % res.output) - pkgs_path = g.glob(str(self.builddir) + "/tmp/deploy/sources/allarch*/xcurs*") + deploy_dir_src = get_bb_var('DEPLOY_DIR_SRC') + pkgs_path = g.glob(str(deploy_dir_src) + "/allarch*/xcurs*") src_file_glob = str(pkgs_path[0]) + "/xcursor*.src.rpm" tar_file_glob = str(pkgs_path[0]) + "/xcursor*.tar.gz" - self.assertTrue((g.glob(src_file_glob) and g.glob(tar_file_glob)), "Couldn't find .src.rpm and .tar.gz files under tmp/deploy/sources/allarch*/xcursor*") + self.assertTrue((g.glob(src_file_glob) and g.glob(tar_file_glob)), "Couldn't find .src.rpm and .tar.gz files under %s/allarch*/xcursor*" % deploy_dir_src)
Signature · 1 line
1.9.1