mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
oeqa/selftest/tinfoil: Update to use test command
We've had IO load issues on the autobuilder with this test. Avoid those by using a specilised test command instead. (From OE-Core rev: 106445b1eb74fc37e03c72a0c011541b50a16c19) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -94,14 +94,13 @@ class TinfoilTests(OESelftestTestCase):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
pattern = 'conf'
|
pattern = 'conf'
|
||||||
res = tinfoil.run_command('findFilesMatchingInDir', pattern, 'conf/machine')
|
res = tinfoil.run_command('testCookerCommandEvent', pattern)
|
||||||
self.assertTrue(res)
|
self.assertTrue(res)
|
||||||
|
|
||||||
eventreceived = False
|
eventreceived = False
|
||||||
commandcomplete = False
|
commandcomplete = False
|
||||||
start = time.time()
|
start = time.time()
|
||||||
# Wait for maximum 60s in total so we'd detect spurious heartbeat events for example
|
# Wait for maximum 60s in total so we'd detect spurious heartbeat events for example
|
||||||
# The test is IO load sensitive too
|
|
||||||
while (not (eventreceived == True and commandcomplete == True)
|
while (not (eventreceived == True and commandcomplete == True)
|
||||||
and (time.time() - start < 60)):
|
and (time.time() - start < 60)):
|
||||||
# if we received both events (on let's say a good day), we are done
|
# if we received both events (on let's say a good day), we are done
|
||||||
@@ -111,7 +110,8 @@ class TinfoilTests(OESelftestTestCase):
|
|||||||
commandcomplete = True
|
commandcomplete = True
|
||||||
elif isinstance(event, bb.event.FilesMatchingFound):
|
elif isinstance(event, bb.event.FilesMatchingFound):
|
||||||
self.assertEqual(pattern, event._pattern)
|
self.assertEqual(pattern, event._pattern)
|
||||||
self.assertIn('qemuarm.conf', event._matches)
|
self.assertIn('A', event._matches)
|
||||||
|
self.assertIn('B', event._matches)
|
||||||
eventreceived = True
|
eventreceived = True
|
||||||
elif isinstance(event, logging.LogRecord):
|
elif isinstance(event, logging.LogRecord):
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user