Changeset 8672


Ignore:
Timestamp:
11 Jun 2012, 10:17:33 (14 years ago)
Author:
uli
Message:

Decouple setup/teardown from multimechanize.

Location:
main/waeup.stress/trunk
Files:
2 added
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.stress/trunk/README.rst

    r8658 r8672  
    6767Basically, you run a stresstest like this::
    6868
    69   (mysandbox) $ ./bin/multimech-run <PROJECT>
     69  (mysandbox) $ ./bin/stress-run <PROJECT>
    7070
    71 where ``<PROJECT>`` is one of the directories in here like 'kofa01'.
     71where ``<PROJECT>`` is the name of one of the directories in here like
     72'kofa01'.
    7273
    7374So,::
    7475
    75   (mysandbox) $ ./bin/multimech-run kofa01
     76  (mysandbox) $ ./bin/stress-run kofa01
    7677
    7778should give some results.
    … …  
    8283run each test.
    8384
     85Generally, for each test project the configuration can be done in the
     86test project root. Here you will find at least a `config.cfg` for
     87ini-style configuration (required) and optionally a `pre_run.py` and
     88`post_run.py` to care for things like setting up an instance and
     89shutting it down afterwards.
     90
    8491Please keep in mind, that these tests normally require some local or
    8592remote setup, for instance a running Kofa instance with certain
  • main/waeup.stress/trunk/kofa01/config.cfg

    r8656 r8672  
    99post_run_script = kofa01/post_run.sh
    1010
     11kofa_instance = kofa
     12kofa_baseport = 8080
     13
     14
    1115[user_group-1]
    1216threads = 5
  • main/waeup.stress/trunk/kofa01/post_run.py

    r8661 r8672  
    55
    66waeup.stress.stop_instance(instance)
     7waeup.stress.configure()
  • main/waeup.stress/trunk/kofa01/test_scripts/config.py

    r8657 r8672  
    1 import time
    2 import waeup.stress
     1## Shared configuration parameters
     2
    33#register_url = 'http://localhost:8080/uniben/applicants/putme2012/register'
    44register_url = 'http://localhost:8080/stress_app/@@index'
    5 print "RUN SETUP"
    6 
    7 instance = 'kofa'
    8 
    9 ## removes any existing ZODB (for a clean ZODB at start)
    10 waeup.stress.remove_zodb(instance)
    11 
    12 ## installs a University named 'stress_app' in root folder
    13 waeup.stress.install_app(instance)
    14 
    15 ## starts an instance as daemon
    16 waeup.stress.start_instance(instance)
    17 waeup.stress.wait_for_startup('localhost', 8080) # wait until daemon is up
    18 ## after starting an instance, we have to wait for the instance to come up
    19 #time.sleep(3)
    20 
    21 ## we need a running instance, so leave this commented out.
    22 #waeup.stress.stop_instance(instance)
  • main/waeup.stress/trunk/setup.py

    r8654 r8672  
    8686      [console_scripts]
    8787      bootstrap_instances = waeup.stress:bootstrap
     88      stress-run = waeup.stress.run:main
    8889      """,
    8990      )
  • main/waeup.stress/trunk/src/waeup/stress/__init__.py

    r8655 r8672  
    122122    subprocess.call(
    123123        './bin/python-console %s' % script, shell=True)
    124    
    125124    os.chdir(old_cwd_)
     125
     126def configure():
     127    import ConfigParser
     128    from multimechanize.utilities.run import project_name, cmd_opts, args
     129    print "Configure"
     130    print "PROJECT NAME: ", project_name
Note: See TracChangeset for help on using the changeset viewer.