From 2d008033c540f07c12e025c342f7474e09e1c615 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Mon, 19 Oct 2015 15:58:26 +0100 Subject: oeqa/selftest: improve config writing and cleanup The selftest.inc configuration file is deleted in both tearDown() and setUp() so there's no need to use addCleanup() to remove statements from it. Use write_config instead of append_config if the intention is to start from an empty config file, for clarity. Finally remove some misleading comments that claim that append_config() writes to local.conf when it doesn't. (From OE-Core rev: ad33259b507914bfc8de92d1df12e0974157900e) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/lib/oeqa/selftest/buildoptions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'meta/lib/oeqa/selftest/buildoptions.py') diff --git a/meta/lib/oeqa/selftest/buildoptions.py b/meta/lib/oeqa/selftest/buildoptions.py index fbe0cd7c37..acf481f7b8 100644 --- a/meta/lib/oeqa/selftest/buildoptions.py +++ b/meta/lib/oeqa/selftest/buildoptions.py @@ -39,7 +39,7 @@ class ImageOptionsTests(oeSelfTest): for image_file in deploydir_files: if imagename in image_file and os.path.islink(os.path.join(deploydir, image_file)): track_original_files.append(os.path.realpath(os.path.join(deploydir, image_file))) - self.append_config("RM_OLD_IMAGE = \"1\"") + self.write_config("RM_OLD_IMAGE = \"1\"") bitbake("-C rootfs core-image-minimal") deploydir_files = os.listdir(deploydir) remaining_not_expected = [path for path in track_original_files if os.path.basename(path) in deploydir_files] @@ -97,7 +97,7 @@ class SanityOptionsTest(oeSelfTest): @testcase(278) def test_sanity_userspace_dependency(self): - self.append_config('WARN_QA_append = " unsafe-references-in-binaries unsafe-references-in-scripts"') + self.write_config('WARN_QA_append = " unsafe-references-in-binaries unsafe-references-in-scripts"') bitbake("-ccleansstate gzip nfs-utils") res = bitbake("gzip nfs-utils") self.assertTrue("WARNING: QA Issue: gzip" in res.output, "WARNING: QA Issue: gzip message is not present in bitbake's output: %s" % res.output) -- cgit v1.2.3-54-g00ecf