def cleanup(self, *args, **kwargs):
        """Finalize state checker and report values to perf dashboard."""
        if self._GSC:
            self._GSC.finalize()

        self._output_perf()
        self._player.close()

        if hasattr(super(GraphicsTest, self), "cleanup"):
            test_utils._cherry_pick_call(
                super(GraphicsTest, self).cleanup, *args, **kwargs)
Beispiel #2
0
    def initialize(self, raise_error_on_hang=False, *args, **kwargs):
        """Initial state checker and report initial value to perf dashboard."""
        self._GSC = GraphicsStateChecker(raise_error_on_hang)

        self.output_perf_value(description='Timeout_Reboot',
                               value=1,
                               units='count',
                               higher_is_better=False)

        if hasattr(super(GraphicsTest, self), "initialize"):
            test_utils._cherry_pick_call(
                super(GraphicsTest, self).initialize, *args, **kwargs)
    def initialize(self, raise_error_on_hang=False, *args, **kwargs):
        """Initial state checker and report initial value to perf dashboard."""
        self._GSC = GraphicsStateChecker(
            raise_error_on_hang=raise_error_on_hang,
            run_on_sw_rasterizer=utils.is_virtual_machine())

        self.output_perf_value(description='Timeout_Reboot',
                               value=1,
                               units='count',
                               higher_is_better=False,
                               replace_existing_values=True)

        # Enable the graphics tests to use keyboard interaction.
        self._player = input_playback.InputPlayback()
        self._player.emulate(input_type='keyboard')
        self._player.find_connected_inputs()

        if hasattr(super(GraphicsTest, self), "initialize"):
            test_utils._cherry_pick_call(
                super(GraphicsTest, self).initialize, *args, **kwargs)
Beispiel #4
0
    def cleanup(self, *args, **kwargs):
        """Finalize state checker and report values to perf dashboard."""
        if self._GSC:
            self._GSC.finalize()

        self.output_perf_value(description='Timeout_Reboot',
                               value=0,
                               units='count',
                               higher_is_better=False,
                               replace_existing_values=True)

        logging.debug('GraphicsTest recorded failures: %s',
                      self.get_failures())
        if self._test_failure_report_enable:
            self.output_perf_value(description=self._test_failure_description,
                                   value=len(self._failures),
                                   units='count',
                                   higher_is_better=False)

        if hasattr(super(GraphicsTest, self), "cleanup"):
            test_utils._cherry_pick_call(
                super(GraphicsTest, self).cleanup, *args, **kwargs)