Bug 11356

Summary: oe-selftest: add an assertExists() function and change tests to use it
Product: [QA/Testing] Build Testing Reporter: Paul Eggleton <bluelightning>
Component: generalAssignee: yeoh ee peng <ee.peng.yeoh>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium CC: benjamin.esquivel, sgw
Version: unspecified   
Target Milestone: 2.4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

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