diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-01-05 06:56:32 -1000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-01-07 23:43:50 +0000 |
commit | 6e6ede294c3391487df196055ad0544b08c2b1b2 (patch) | |
tree | 67996bd606d09268aef1a1d7cbfe17b550a2b84c /bitbake/lib/bb | |
parent | 0490ee594486856be2023c400e2b27bfb9f2f93e (diff) | |
download | poky-6e6ede294c3391487df196055ad0544b08c2b1b2.tar.gz |
bitbake: cooker/command: Add a dummy event for tinfoil testing
We need a command genetating an event to test through the tinfoil API. The
current test has IO load issues so add a dummy version which won't have
the IO constraints.
(Bitbake rev: c5969eedd035648e3258bade386cc67ce3bb0e03)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a144178584394ea0700ffc2f2bfac94e8690effc)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/command.py | 10 | ||||
-rw-r--r-- | bitbake/lib/bb/cooker.py | 5 |
2 files changed, 15 insertions, 0 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index 07128027fd..98c945edb5 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py | |||
@@ -624,6 +624,16 @@ class CommandsAsync: | |||
624 | command.finishAsyncCommand() | 624 | command.finishAsyncCommand() |
625 | findFilesMatchingInDir.needcache = False | 625 | findFilesMatchingInDir.needcache = False |
626 | 626 | ||
627 | def testCookerCommandEvent(self, command, params): | ||
628 | """ | ||
629 | Dummy command used by OEQA selftest to test tinfoil without IO | ||
630 | """ | ||
631 | pattern = params[0] | ||
632 | |||
633 | command.cooker.testCookerCommandEvent(pattern) | ||
634 | command.finishAsyncCommand() | ||
635 | testCookerCommandEvent.needcache = False | ||
636 | |||
627 | def findConfigFilePath(self, command, params): | 637 | def findConfigFilePath(self, command, params): |
628 | """ | 638 | """ |
629 | Find the path of the requested configuration file | 639 | Find the path of the requested configuration file |
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 8d9ca68062..ac54d4378d 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -1019,6 +1019,11 @@ class BBCooker: | |||
1019 | if matches: | 1019 | if matches: |
1020 | bb.event.fire(bb.event.FilesMatchingFound(filepattern, matches), self.data) | 1020 | bb.event.fire(bb.event.FilesMatchingFound(filepattern, matches), self.data) |
1021 | 1021 | ||
1022 | def testCookerCommandEvent(self, filepattern): | ||
1023 | # Dummy command used by OEQA selftest to test tinfoil without IO | ||
1024 | matches = ["A", "B"] | ||
1025 | bb.event.fire(bb.event.FilesMatchingFound(filepattern, matches), self.data) | ||
1026 | |||
1022 | def findProviders(self, mc=''): | 1027 | def findProviders(self, mc=''): |
1023 | return bb.providers.findProviders(self.databuilder.mcdata[mc], self.recipecaches[mc], self.recipecaches[mc].pkg_pn) | 1028 | return bb.providers.findProviders(self.databuilder.mcdata[mc], self.recipecaches[mc], self.recipecaches[mc].pkg_pn) |
1024 | 1029 | ||