summaryrefslogtreecommitdiffstats
path: root/bitbake/bin/toaster-eventreplay
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/bin/toaster-eventreplay')
-rwxr-xr-xbitbake/bin/toaster-eventreplay14
1 files changed, 2 insertions, 12 deletions
diff --git a/bitbake/bin/toaster-eventreplay b/bitbake/bin/toaster-eventreplay
index a1072988ac..b9ab79e422 100755
--- a/bitbake/bin/toaster-eventreplay
+++ b/bitbake/bin/toaster-eventreplay
@@ -30,6 +30,7 @@ from __future__ import print_function
30import os 30import os
31import sys, logging 31import sys, logging
32import codecs 32import codecs
33from collections import namedtuple
33 34
34# mangle syspath to allow easy import of modules 35# mangle syspath to allow easy import of modules
35sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 36sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
@@ -159,17 +160,6 @@ class FileReadEventsServerConnection():
159 160
160 self.events = FileReadEventsServerConnection.EventReader(self) 161 self.events = FileReadEventsServerConnection.EventReader(self)
161 162
162
163
164
165
166class MockConfigParameters():
167 """ stand-in for cookerdata.ConfigParameters; as we don't really config a cooker, this
168 serves just to supply needed interfaces for the toaster ui to work """
169 def __init__(self):
170 self.observe_only = True # we can only read files
171
172
173# run toaster ui on our mock bitbake class 163# run toaster ui on our mock bitbake class
174if __name__ == "__main__": 164if __name__ == "__main__":
175 if len(sys.argv) < 2: 165 if len(sys.argv) < 2:
@@ -178,7 +168,7 @@ if __name__ == "__main__":
178 168
179 file_name = sys.argv[-1] 169 file_name = sys.argv[-1]
180 mock_connection = FileReadEventsServerConnection(file_name) 170 mock_connection = FileReadEventsServerConnection(file_name)
181 configParams = MockConfigParameters() 171 configParams = namedtuple('ConfigParams', ['observe_only'])(True)
182 172
183 # run the main program and set exit code to the returned value 173 # run the main program and set exit code to the returned value
184 sys.exit(toasterui.main(mock_connection.connection, mock_connection.events, configParams)) 174 sys.exit(toasterui.main(mock_connection.connection, mock_connection.events, configParams))