← Back to team overview

touch-packages team mailing list archive

[Bug 1250458] Re: Screen unlock helpers needs to be simpler for developers

 

** No longer affects: unity8

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to unity8 in Ubuntu.
https://bugs.launchpad.net/bugs/1250458

Title:
  Screen unlock helpers needs to be simpler for developers

Status in “unity8” package in Ubuntu:
  Triaged

Bug description:
  Right now the screen unlocking helper in process_helpers.py provides
  two functions. One to unlock the screen and the other to start unity
  in testability but they are not called from within each other.

  What would make more sense and also make the life of developers  easy
  is that unlock_unity() should itself check if unity is running in
  testability and if not start it in testability and unlock the screen.
  Also if the screen is already unlocked it should just do nothing
  instead of raising an exception.

  With the above suggestion I think it makes more sense to rename that
  function to ensure_unity_unlocked().

  Currently I am using something like this and calling it in setUp():

  def ensure_screen_unlocked(self):
      unity_pid = process_helpers._get_unity_pid()

      try:
          if get_proxy_object_for_existing_process(unity_pid):
              process_helpers.unlock_unity()
      except RuntimeError:
          logger.log("Could not find autopilot interface for unity8, "
                              "restarting it in testability mode.")
          process_helpers.restart_unity_with_testability()
          process_helpers.unlock_unity()

  ProblemType: Bug
  DistroRelease: Ubuntu 14.04
  Package: unity8 7.83+14.04.20131106-0ubuntu1
  ProcVersionSignature: Ubuntu 3.12.0-2.5-generic 3.12.0
  Uname: Linux 3.12.0-2-generic i686
  NonfreeKernelModules: wl
  ApportVersion: 2.12.6-0ubuntu1
  Architecture: i386
  Date: Tue Nov 12 17:47:38 2013
  InstallationDate: Installed on 2013-11-07 (4 days ago)
  InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Alpha i386 (20131107)
  MarkForUpload: True
  SourcePackage: unity8
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1250458/+subscriptions