Project

General

Profile

Building and testing

Running the server requires

  • Python 2.7 (v2_7_2 is available from kits)
  • cherrypy 3.2
  • nose (for running tests)
  • sam v9_0_0_beta2 or newer (do setup sam <version> -O python)

Fetch code from repository

git clone ssh://p-sam-web@cdcvs.fnal.gov/cvs/projects/sam-web
cd sam-web

Make sure the products listed above are available on the PYTHONPATH.

The web server can be started with

cherryd -i samweb -c devel.conf

Edit the config file in order to change the listening port, etc.

Before running the test suite, be sure to export the db
password variables:

export SAM_WEB_SAMDEV_DB_PASSWORD=...
export SAM_WEB_MINERVA_DB_PASSWORD=...
export SAM_WEB_DZERO_DB_PASSWORD=...

Then, to run the test suite:

nosetests [-v]

An individual test script can be run by

nosetests tests/<test_script.py>

or even an individual test.

nosetests tests/<test_script.py:ModuleName.testname>