xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Ticket #2306: xauth-test-fix.patch

File xauth-test-fix.patch, 3.6 KB (added by Antoine Martin, 2 years ago)

"fix" by removing xauthority

  • src/unittests/unit/server/mixins/server_mixins_option_test_util.py

     
    125125
    126126            client_kwargs = {}
    127127            if not (WIN32 or OSX):
    128                 env = os.environ.copy()
     128                env = self.get_run_env()
    129129                env["DISPLAY"] = self.client_display
    130130                client_kwargs = {"env" : env}
     131                log.warn("self.client_xvfb=%s, poll()=%s", self.client_xvfb, self.client_xvfb.poll())
     132                #self.run_command()
    131133
    132134            if subcommand in ("shadow", "start-desktop") and TEST_RFB and options.get("windows", True):
    133135                vncviewer = which("vncviewer")
  • src/unittests/unit/server/mixins/start_option_test.py

     
    1515    def test_nooptions(self):
    1616        self._test()
    1717
    18     def test_nonotifications(self):
     18    def Xtest_nonotifications(self):
    1919        self._test(options={"notifications" : False})
    2020
    21     def test_start_all(self):
     21    def Xtest_start_all(self):
    2222        self._test_all("start")
    2323
    2424
  • src/unittests/unit/server_test_util.py

     
    4040        from xpra.server.server_util import find_log_dir
    4141        cls.xauthority_temp = tempfile.NamedTemporaryFile(prefix="xpra-test.", suffix=".xauth", delete=False)
    4242        cls.xauthority_temp.close()
    43         os.environ["XAUTHORITY"] = os.path.expanduser(cls.xauthority_temp.name)
     43        #os.environ["XAUTHORITY"] = os.path.expanduser(cls.xauthority_temp.name)
    4444        os.environ["XPRA_LOG_DIR"] = find_log_dir()
    4545        os.environ["XPRA_NOTTY"] = "1"
    4646        os.environ["XPRA_WAIT_FOR_INPUT"] = "0"
     
    135135
    136136    def run_command(self, command, env=None, **kwargs):
    137137        if env is None:
    138             env = self.get_run_env()
    139         kwargs["env"] = env
     138            env = kwargs.get("env")
     139            if not env:
     140                env = self.get_run_env()
     141                kwargs["env"] = env
    140142        stdout_file = stderr_file = None
    141143        if isinstance(command, str):
    142144            strcommand = command
     
    145147        if XPRA_TEST_DEBUG:
    146148            log("************************")
    147149            log("run_command(%s, %s)", " ".join('"%s"' % x for x in command), repr_ellipsized(str(env), 40))
     150            log("env=%s", env)
    148151            log("************************")
    149152        else:
    150153            if "stdout" not in kwargs:
     
    253256                                ):    #DBUS_SESSION_BUS_ADDRESS
    254257                #keep it
    255258                env[x] = os.environ.get(x)
    256         if len(screens)>1:
    257             cmd = ["Xvfb", "+extension", "Composite", "-nolisten", "tcp", "-noreset",
    258                     "-auth", self.default_env["XAUTHORITY"]]
     259        if len(screens)>1 or True:
     260            cmd = ["Xvfb", "+extension", "Composite", "-nolisten", "tcp", "-noreset"]
     261                    #"-auth", self.default_env["XAUTHORITY"]]
    259262            for i, screen in enumerate(screens):
    260263                (w, h) = screen
    261264                cmd += ["-screen", "%i" % i, "%ix%ix24+32" % (w, h)]