~ubuntu-branches/ubuntu/oneiric/lightning-extension/oneiric-security

« back to all changes in this revision

Viewing changes to mozilla/build/mobile/devicemanagerSUT.py

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2012-04-20 13:46:11 UTC
  • mfrom: (1.2.1)
  • mto: (1.3.1)
  • mto: This revision was merged to the branch mainline in revision 19.
  • Revision ID: package-import@ubuntu.com-20120420134611-i0dkosnbmihrd0lr
Tags: upstream-1.4+build1
ImportĀ upstreamĀ versionĀ 1.4+build1

Show diffs side-by-side

added added

removed removed

Lines of Context:
552
552
    pieces = appname.split(' ')
553
553
    parts = pieces[0].split('/')
554
554
    app = parts[-1]
555
 
    procre = re.compile('.*' + app + '.*')
556
555
 
557
556
    procList = self.getProcessList()
558
557
    if (procList == []):
559
558
      return None
560
559
      
561
560
    for proc in procList:
562
 
      if (procre.match(proc[1])):
 
561
      procName = proc[1].split('/')[-1]
 
562
      if (procName == app):
563
563
        pid = proc[0]
564
564
        break
565
565
    return pid
858
858
 
859
859
    return deviceRoot
860
860
 
 
861
  def getAppRoot(self, packageName):
 
862
    try:
 
863
      data = self.verifySendCMD(['getapproot '+packageName])
 
864
    except:
 
865
      return None
 
866
  
 
867
    appRoot = self.stripPrompt(data).strip('\n')
 
868
    return appRoot
 
869
 
861
870
  # external function
862
871
  # returns:
863
872
  #  success: output of unzip command