[Erp5-report] r40343 gabriel - in /erp5/trunk/buildout: instance-profiles/ profiles/ templa...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Nov 18 03:40:04 CET 2010


Author: gabriel
Date: Thu Nov 18 03:40:02 2010
New Revision: 40343

URL: http://svn.erp5.org?rev=40343&view=rev
Log:
remove template and clean up the profile. This template was moved to cloudooo tests

Removed:
    erp5/trunk/buildout/templates/runCloudOOoUnitTest.py.in
Modified:
    erp5/trunk/buildout/instance-profiles/cloudooo.cfg
    erp5/trunk/buildout/profiles/test-cloudooo.cfg

Modified: erp5/trunk/buildout/instance-profiles/cloudooo.cfg
URL: http://svn.erp5.org/erp5/trunk/buildout/instance-profiles/cloudooo.cfg?rev=40343&r1=40342&r2=40343&view=diff
==============================================================================
--- erp5/trunk/buildout/instance-profiles/cloudooo.cfg [utf8] (original)
+++ erp5/trunk/buildout/instance-profiles/cloudooo.cfg [utf8] Thu Nov 18 03:40:02 2010
@@ -1,7 +1,6 @@
 [buildout]
 extends = 
   ../profiles/software-definition.cfg
-  ../profiles/links.cfg
 
 parts =
   cloudooo-instance-template

Modified: erp5/trunk/buildout/profiles/test-cloudooo.cfg
URL: http://svn.erp5.org/erp5/trunk/buildout/profiles/test-cloudooo.cfg?rev=40343&r1=40342&r2=40343&view=diff
==============================================================================
--- erp5/trunk/buildout/profiles/test-cloudooo.cfg [utf8] (original)
+++ erp5/trunk/buildout/profiles/test-cloudooo.cfg [utf8] Thu Nov 18 03:40:02 2010
@@ -1,20 +1,2 @@
 [buildout]
 extends = ../instance-profiles/cloudooo.cfg
-parts += 
-      runUnitTest
-      chmod
-
-[runUnitTest]
-recipe = z3c.recipe.template
-input = ${buildout:directory}/templates/runCloudOOoUnitTest.py.in
-output = ${buildout:bin-directory}/runCloudOOoUnitTest.py
-tests-directory = ${software_definition:software_home}/src/cloudooo/cloudooo/tests
-cloudoooctl-path = ${cloudooo-instance-template:ctl-output} 
-conf-path = ${cloudooo-instance-template:conf-output}
-timeout-limit = 60
-
-[chmod]
-recipe = plone.recipe.command
-command =
-  chmod a+x ${buildout:bin-directory}/runCloudOOoUnitTest.py
-update = {:command}

Removed: erp5/trunk/buildout/templates/runCloudOOoUnitTest.py.in
URL: http://svn.erp5.org/erp5/trunk/buildout/templates/runCloudOOoUnitTest.py.in?rev=40342&view=auto
==============================================================================
--- erp5/trunk/buildout/templates/runCloudOOoUnitTest.py.in [utf8] (original)
+++ erp5/trunk/buildout/templates/runCloudOOoUnitTest.py.in (removed)
@@ -1,107 +0,0 @@
-#!${buildout:executable}
-
-import sys
-import unittest
-import psutil
-from psutil.error import AccessDenied
-from getopt import getopt, GetoptError
-from time import sleep
-from cloudooo.utils import socketStatus, waitStopDaemon 
-from ConfigParser import ConfigParser
-from os import chdir
-from os.path import join, exists
-from os import remove
-from getpass import getuser
-from subprocess import Popen
-
-log_path = '${buildout:directory}/log/cloudooo.log'
-environment_path = '${tests-directory}'
-cloudooo_runner = '${cloudoooctl-path}'
-server_cloudooo_conf = '${conf-path}'
-timeout_limit = ${timeout-limit}
-sys.path.append(environment_path)
-chdir(environment_path)
-from cloudoooTestCase import loadConfig, startFakeEnvironment, stopFakeEnvironment
-
-def wait_liberate_port(hostname, port):
-  for n in range(timeout_limit):
-    if not socketStatus(hostname, port):
-      break
-    sleep(1)
-
-def wait_use_port(hostname, port):
-  for n in range(timeout_limit):
-    if socketStatus(hostname, port):
-      return
-    sleep(1)
-
-def get_partial_log():
-  if exists(log_path):
-    return '\n'.join(open(log_path).read().split('\n')[-30:])
-  return ''
-
-def exit(msg):
-  sys.stderr.write(msg)
-  sys.exit(0) 
-
-def run_test(test_name):
-  module = __import__(test_name)
-  if not hasattr(module, "test_suite"):
-    exit("No test suite to run, exiting immediately")
-  TestRunner = unittest.TextTestRunner
-  suite = unittest.TestSuite()
-  suite.addTest(module.test_suite())
-  TestRunner(verbosity=2).run(suite)
-
-DAEMON = OPENOFFICE = XVFB = False
-
-config = ConfigParser()
-config.read(server_cloudooo_conf)
-openoffice_port = int(config.get("app:main", "openoffice_port"))
-xvfb_port = int(config.get("app:main", "virtual_display_port"))
-xvfb_display_id = int(config.get("app:main", "virtual_display_id"))
-hostname = config.get("app:main", "application_hostname")
-server_port = int(config.get("server:main", "port"))
-run_dir = config.get('app:main', 'working_path')
-
-try:
-  opt_list, arg_list = getopt(sys.argv[1:-1], "", ["with-daemon",
-                                                  "with-openoffice",
-                                                  "with-xvfb"])
-except GetoptError, msg:
-  exit(msg.msg)
-
-for opt, arg in opt_list:
-  if opt == "--with-daemon":
-    DAEMON = True
-  elif opt == "--with-openoffice":
-    OPENOFFICE = True
-  elif opt == "--with-xvfb":
-    XVFB = True
-
-test_name = sys.argv[-1]
-if not exists(join(environment_path, '%s.py' % test_name)):
-  exit("%s not exists\n" % test_name)
-
-if DAEMON:
-  loadConfig(server_cloudooo_conf)
-  Popen([cloudooo_runner, 'start']).communicate()
-  wait_use_port(hostname, server_port)
-  print get_partial_log()
-  try:
-    run_test(test_name)
-  finally:
-    Popen([cloudooo_runner, 'stop']).communicate()
-  wait_liberate_port(hostname, server_port)
-elif OPENOFFICE:
-  openoffice, xvfb = startFakeEnvironment(conf_path=server_cloudooo_conf)
-  run_test(test_name)
-  stopFakeEnvironment()
-elif XVFB:
-  xvfb = startFakeEnvironment(start_openoffice=False,
-                              conf_path=server_cloudooo_conf)
-  run_test(test_name)
-  stopFakeEnvironment(stop_openoffice=False)
-else:
-  loadConfig(server_cloudooo_conf)
-  run_test(test_name)




More information about the Erp5-report mailing list