diff options
author | Ross Burton <ross.burton@intel.com> | 2015-10-19 15:58:26 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-10-21 22:56:07 +0100 |
commit | 2d008033c540f07c12e025c342f7474e09e1c615 (patch) | |
tree | 03b1aaf0882723233b3b206dd77c3b6975040a55 /meta/lib/oeqa/selftest/buildoptions.py | |
parent | 1881564cdd8f52c2d7ee46e4c2d38272c4d9820c (diff) | |
download | poky-2d008033c540f07c12e025c342f7474e09e1c615.tar.gz |
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 <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/buildoptions.py')
-rw-r--r-- | meta/lib/oeqa/selftest/buildoptions.py | 4 |
1 files changed, 2 insertions, 2 deletions
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): | |||
39 | for image_file in deploydir_files: | 39 | for image_file in deploydir_files: |
40 | if imagename in image_file and os.path.islink(os.path.join(deploydir, image_file)): | 40 | if imagename in image_file and os.path.islink(os.path.join(deploydir, image_file)): |
41 | track_original_files.append(os.path.realpath(os.path.join(deploydir, image_file))) | 41 | track_original_files.append(os.path.realpath(os.path.join(deploydir, image_file))) |
42 | self.append_config("RM_OLD_IMAGE = \"1\"") | 42 | self.write_config("RM_OLD_IMAGE = \"1\"") |
43 | bitbake("-C rootfs core-image-minimal") | 43 | bitbake("-C rootfs core-image-minimal") |
44 | deploydir_files = os.listdir(deploydir) | 44 | deploydir_files = os.listdir(deploydir) |
45 | remaining_not_expected = [path for path in track_original_files if os.path.basename(path) in deploydir_files] | 45 | 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): | |||
97 | 97 | ||
98 | @testcase(278) | 98 | @testcase(278) |
99 | def test_sanity_userspace_dependency(self): | 99 | def test_sanity_userspace_dependency(self): |
100 | self.append_config('WARN_QA_append = " unsafe-references-in-binaries unsafe-references-in-scripts"') | 100 | self.write_config('WARN_QA_append = " unsafe-references-in-binaries unsafe-references-in-scripts"') |
101 | bitbake("-ccleansstate gzip nfs-utils") | 101 | bitbake("-ccleansstate gzip nfs-utils") |
102 | res = bitbake("gzip nfs-utils") | 102 | res = bitbake("gzip nfs-utils") |
103 | self.assertTrue("WARNING: QA Issue: gzip" in res.output, "WARNING: QA Issue: gzip message is not present in bitbake's output: %s" % res.output) | 103 | self.assertTrue("WARNING: QA Issue: gzip" in res.output, "WARNING: QA Issue: gzip message is not present in bitbake's output: %s" % res.output) |