Exemplo n.º 1
0
    def _run_test_qt(self, test_program):
        env = self._test_env
        env['XDG_SESSION_TYPE'] = 'wayland'
        env['QML2_IMPORT_PATH'] = common.library_build_path('qt5', 'qml')

        name = os.path.basename(test_program)
        if not hasattr(subprocess, 'TimeoutExpired'):
            print("Can't run WPEQt test in Python2 without subprocess32")
            return {name: "FAIL"}

        try:
            output = subprocess.check_output([test_program, ], stderr=subprocess.STDOUT,
                                             env=env, timeout=self._options.timeout)
        except subprocess.CalledProcessError as exc:
            print(exc.output)
            if exc.returncode > 0:
                result = "FAIL"
            elif exc.returncode < 0:
                result = "CRASH"
        except subprocess.TimeoutExpired as exp:
            result = "TIMEOUT"
            print(exp.output)
        else:
            result = "PASS"
            print("**PASS** %s" % name)
        return {name: result}
Exemplo n.º 2
0
 def _setup_testing_environment(self):
     self._test_env = self._driver._setup_environ_for_test()
     self._test_env[
         "TEST_WEBKIT_API_WEBKIT2_RESOURCES_PATH"] = common.top_level_path(
             "Tools", "TestWebKitAPI", "Tests", "WebKit")
     self._test_env[
         "TEST_WEBKIT_API_WEBKIT2_INJECTED_BUNDLE_PATH"] = common.library_build_path(
         )
     self._test_env["WEBKIT_EXEC_PATH"] = self._programs_path