def __init__(self):
info('platform: %s' % platform)
info('exists main.py: %s' % exists('main.py'))
- args = self._parse_args()
+ self._args = args = self._parse_args()
self._configure(args)
self.base = ShowBase()
self._pipeline = None
self._menu_bg = Background()
self._menu = Menu(
self._fsm, self.lang_mgr, self._options, self._music,
- self._pipeline, self.scenes)
+ self._pipeline, self.scenes, self._args.functional_test or self._args.functional_ref)
def on_home(self):
self._fsm.demand('Menu')
class Menu:
- def __init__(self, fsm, lang_mgr, opt_file, music, pipeline, scenes):
+ def __init__(self, fsm, lang_mgr, opt_file, music, pipeline, scenes, fun_test):
self._fsm = fsm
self._lang_mgr = lang_mgr
self._opt_file = opt_file
self._music = music
self._pipeline = pipeline
self._scenes = scenes
+ self._fun_test = fun_test
self._cursor = MouseCursor(
'assets/images/buttons/arrowUpLeft.dds', (.04, 1, .04), (.5, .5, .5, 1),
(.01, .01))
def on_fullscreen(self, arg):
props = WindowProperties()
props.set_fullscreen(arg)
- base.win.request_properties(props)
+ if not self._fun_test:
+ base.win.request_properties(props)
+ # if we actually switch to fullscreen during the tests then
+ # exwm inside qemu can't restore the correct resolution
+ # i may re-enable this if/when i run the tests onto a
+ # physical machine
self._opt_file['settings']['fullscreen'] = int(arg)
self._opt_file.store()
self._screenshot(FunctionalTest.screenshot_time, 'options_menu_drag_2')
# fullscreen
# the first one is because of the windowed mode in test
- # it does not work with ffmpeg recording
- # self._event(FunctionalTest.evt_time, 'mouseclick', [(680, 250), 'left'])
- # self._screenshot(FunctionalTest.screenshot_time, 'fullscreen')
- # self._event(FunctionalTest.evt_time, 'mouseclick', [(680, 250), 'left'])
- # self._screenshot(FunctionalTest.screenshot_time, 'fullscreen')
- # self._event(8 + FunctionalTest.evt_time, 'mouseclick', [(440, 120), 'left'])
- # self._screenshot(8 + FunctionalTest.screenshot_time, 'back_from_fullscreen')
+ self._event(FunctionalTest.evt_time, 'mouseclick', [(680, 250), 'left'])
+ self._screenshot(FunctionalTest.screenshot_time, 'fullscreen')
+ self._event(FunctionalTest.evt_time, 'mouseclick', [(680, 250), 'left'])
+ self._screenshot(FunctionalTest.screenshot_time, 'fullscreen')
+ self._event(8 + FunctionalTest.evt_time, 'mouseclick', [(440, 120), 'left'])
+ self._screenshot(8 + FunctionalTest.screenshot_time, 'back_from_fullscreen')
# resolution
self._event(FunctionalTest.evt_time, 'mouseclick', [(680, 340), 'left'])
self._screenshot(FunctionalTest.screenshot_time, 'resolutions')