From: Chen Qi Date: Tue, 10 Jan 2017 02:24:54 +0000 (+0800) Subject: selftest/buildoptions.py: fix path assumption for DEPLOY_DIR_SRC X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~23070 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=dab5d3901755a965cdd8f5b5e8ffb8e4cb79f2e5;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git selftest/buildoptions.py: fix path assumption for DEPLOY_DIR_SRC Fix path assumption for DEPLOY_DIR_SRC, otherwise, the testcase may fail even if the functionality works well. Signed-off-by: Chen Qi Signed-off-by: Ross Burton --- diff --git a/meta/lib/oeqa/selftest/buildoptions.py b/meta/lib/oeqa/selftest/buildoptions.py index 25d14f7c7a6..95fd2f01ec5 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)