Bug 11356 - oe-selftest: add an assertExists() function and change tests to use it
Summary: oe-selftest: add an assertExists() function and change tests to use it
Status: RESOLVED FIXED
Alias: None
Product: Build Testing
Classification: QA/Testing
Component: general (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: 2.4
Assignee: yeoh ee peng
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-04-13 12:39 UTC by Paul Eggleton
Modified: 2017-09-15 03:06 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2017-04-13 12:39:19 UTC
In a lot of our oe-selftest tests, for example in the devtool module, we use something like self.assertTrue(os.path.exists(filepath)) - this leads to slightly awkward messages on failure starting with "False is not true" (no kidding!). To avoid that and make the test code slightly less verbose, let's add assertExists() and assertNotExists() methods on the base test class and change all tests doing an assert on file existence to use that.
Comment 1 yeoh ee peng 2017-09-15 03:06:56 UTC
Pushed commit to mailing list for review:
http://lists.openembedded.org/pipermail/openembedded-core/2017-June/138178.html