示例#1
0
    def run(self):
      """Do a little setup, then pass off to old python script"""

      # remove dir if exists and recreate it. other wise create it
      refresh_dir(self.directory)

      # pass off to preparetest.py
      cmd = "python preparetest.py " + str(self.directory)
      if self.include_repy_tests:
        cmd += " -t"
      preparetest.exec_command(cmd)
示例#2
0
def squeeze_it(script, tmpdirname):
  """
  <Purpose>
    Turn a bunch of python files into one compressed file
   
  <Args>
    script - the main module to start at
    tmpdirname - the directory with all the dependent files 

  <Pre>
    Process all files using process_it() into the tmp dir.
    The files in the tmp should be the minimal set of files.

  <Side Effect>
    Dumps the compressed script into the current directory
  """
  fileglob = tmpdirname + "/*.py"
  scriptnameonly = os.path.splitext(os.path.basename(script))[0]
  cmd = "python squeeze.py -1 -o " + scriptnameonly + " -b " + scriptnameonly + " " + fileglob
  preparetest.exec_command(cmd)