~ubuntu-branches/ubuntu/precise/enigmail/precise

« back to all changes in this revision

Viewing changes to build/pgo/profileserver.py

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2011-11-16 21:30:26 UTC
  • mfrom: (0.12.7)
  • Revision ID: package-import@ubuntu.com-20111116213026-7i0cpxql4kyjcdg4
Tags: 2:1.3.3-0ubuntu1
* New upstream release v1.3.3
* Add patch to define constants in nsIEnigmail.idl as unsigned long, so
  that the new IDL parser doesn't fall over
  - add debian/patches/new_idl_parser_compat.patch
  - update debian/patches/series

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
  from optparse import OptionParser
65
65
  automation = Automation()
66
66
 
67
 
  parser = OptionParser(usage='OBJDIR=path/to/objdir python %prog [NUM_RUNS]')
 
67
  parser = OptionParser()
68
68
  addCommonOptions(parser)
69
69
 
70
70
  options, args = parser.parse_args()
71
71
 
72
 
  if not os.getenv('OBJDIR'):
73
 
      parser.error('Please specify the OBJDIR environment variable.')
74
 
 
75
 
  if not args:
76
 
      num_runs = 1
77
 
  else:
78
 
      try:
79
 
          num_runs = int(args[0])
80
 
      except:
81
 
          parser.error('NUM_RUNS argument must be an integer.')
82
 
      if num_runs < 1:
83
 
          parser.error('NUM_RUNS must be greater than zero.')
84
 
 
85
72
  debuggerInfo = getDebuggerInfo(".", options.debugger, options.debuggerArgs,
86
73
          options.debuggerInteractive)
87
74
 
98
85
 
99
86
  url = "http://localhost:%d/index.html" % PORT
100
87
  appPath = os.path.join(SCRIPT_DIR, automation.DEFAULT_APP)
101
 
 
102
 
  for i in range(0, num_runs):
103
 
      if num_runs != 1:
104
 
          print "Starting profiling run %d of %d" % (i + 1, num_runs)
105
 
      status = automation.runApp(url, browserEnv, appPath, PROFILE_DIRECTORY, {},
106
 
                                 debuggerInfo=debuggerInfo,
107
 
                                 # the profiling HTML doesn't output anything,
108
 
                                 # so let's just run this without a timeout
109
 
                                 timeout = None)
110
 
      if status != 0:
111
 
          sys.exit(status)
 
88
  status = automation.runApp(url, browserEnv, appPath, PROFILE_DIRECTORY, {},
 
89
                             debuggerInfo=debuggerInfo,
 
90
                             # the profiling HTML doesn't output anything,
 
91
                             # so let's just run this without a timeout
 
92
                             timeout = None)
 
93
  sys.exit(status)