* [PATCH 1/2] selftest/bbtests.py: fix path assumption for LICENSE_DIRECTORY
2017-01-10 2:24 [PATCH 0/2] selftest: fix path assumption Chen Qi
@ 2017-01-10 2:24 ` Chen Qi
2017-01-10 2:24 ` [PATCH 2/2] selftest/buildoptions.py: fix path assumption for DEPLOY_DIR_SRC Chen Qi
1 sibling, 0 replies; 3+ messages in thread
From: Chen Qi @ 2017-01-10 2:24 UTC (permalink / raw)
To: openembedded-core
Fix path assumption for LICENSE_DIRECTORY, otherwise, the test case
may fail even if the functionality it tests works well.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/lib/oeqa/selftest/bbtests.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/meta/lib/oeqa/selftest/bbtests.py b/meta/lib/oeqa/selftest/bbtests.py
index 08cc401..c4e50cb 100644
--- a/meta/lib/oeqa/selftest/bbtests.py
+++ b/meta/lib/oeqa/selftest/bbtests.py
@@ -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):
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 2/2] selftest/buildoptions.py: fix path assumption for DEPLOY_DIR_SRC
2017-01-10 2:24 [PATCH 0/2] selftest: fix path assumption Chen Qi
2017-01-10 2:24 ` [PATCH 1/2] selftest/bbtests.py: fix path assumption for LICENSE_DIRECTORY Chen Qi
@ 2017-01-10 2:24 ` Chen Qi
1 sibling, 0 replies; 3+ messages in thread
From: Chen Qi @ 2017-01-10 2:24 UTC (permalink / raw)
To: openembedded-core
Fix path assumption for DEPLOY_DIR_SRC, otherwise, the testcase may fail
even if the functionality works well.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/lib/oeqa/selftest/buildoptions.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/meta/lib/oeqa/selftest/buildoptions.py b/meta/lib/oeqa/selftest/buildoptions.py
index 25d14f7..95fd2f0 100644
--- a/meta/lib/oeqa/selftest/buildoptions.py
+++ b/meta/lib/oeqa/selftest/buildoptions.py
@@ -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)
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread