Merge lp:~nskaggs/ubuntu-calendar-app/remove-xauthority into lp:ubuntu-calendar-app

Proposed by Nicholas Skaggs
Status: Needs review
Proposed branch: lp:~nskaggs/ubuntu-calendar-app/remove-xauthority
Merge into: lp:ubuntu-calendar-app
Diff against target: 34 lines (+0/-18)
1 file modified
tests/autopilot/calendar_app/tests/__init__.py (+0/-18)
To merge this branch: bzr merge lp:~nskaggs/ubuntu-calendar-app/remove-xauthority
Reviewer Review Type Date Requested Status
Jenkins Bot continuous-integration Approve
Ubuntu Calendar Developers Pending
Review via email: mp+288836@code.launchpad.net

Commit message

Remove unneeded _copy_xauthority_file

Description of the change

Remove unneeded _copy_xauthority_file

To post a comment you must log in.
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)

Unmerged revisions

769. By Nicholas Skaggs

remove _copy_xauthority_file

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/autopilot/calendar_app/tests/__init__.py'
--- tests/autopilot/calendar_app/tests/__init__.py 2014-11-07 20:53:29 +0000
+++ tests/autopilot/calendar_app/tests/__init__.py 2016-03-11 21:16:47 +0000
@@ -83,23 +83,6 @@
83 "com.ubuntu.calendar",83 "com.ubuntu.calendar",
84 emulator_base=ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase)84 emulator_base=ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase)
8585
86 def _copy_xauthority_file(self, directory):
87 """ Copy .Xauthority file to directory, if it exists in /home
88 """
89 # If running under xvfb, as jenkins does,
90 # xsession will fail to start without xauthority file
91 # Thus if the Xauthority file is in the home directory
92 # make sure we copy it to our temp home directory
93
94 xauth = os.path.expanduser(os.path.join(os.environ.get('HOME'),
95 '.Xauthority'))
96 if os.path.isfile(xauth):
97 logger.debug("Copying .Xauthority to %s" % directory)
98 shutil.copyfile(
99 os.path.expanduser(os.path.join(os.environ.get('HOME'),
100 '.Xauthority')),
101 os.path.join(directory, '.Xauthority'))
102
103 def patch_home(self):86 def patch_home(self):
104 """ mock /home for testing purposes to preserve user data87 """ mock /home for testing purposes to preserve user data
105 """88 """
@@ -117,7 +100,6 @@
117 temp_dir = temp_dir_fixture.path100 temp_dir = temp_dir_fixture.path
118101
119 # before we set fixture, copy xauthority if needed102 # before we set fixture, copy xauthority if needed
120 self._copy_xauthority_file(temp_dir)
121 self.useFixture(fixtures.EnvironmentVariable('HOME',103 self.useFixture(fixtures.EnvironmentVariable('HOME',
122 newvalue=temp_dir))104 newvalue=temp_dir))
123105

Subscribers

People subscribed via source and target branches

to status/vote changes: