#!/bin/bash set -e # Call this testing script with an argument "setup" for the first time # to build the testing case # # After that, the script only performs the test as described below. # # Requirements: apt-get install virtualenv python2.7-dbg # # This script needs internet access when running. # The python version to test: python=/usr/bin/python2.7-dbg # This part builds the testing environment if [ "$1" == "setup" ] ; then # Virtual environment with the chosen python virtualenv --python ${python} --no-site-packages zope-virtualenv cd zope-virtualenv # Basic Zope installation ./bin/easy_install -i http://download.zope.org/Zope2/index/2.13.24 Zope2 # Simplest possible Zope instance ./bin/mkzopeinstance --dir instance --user admin:admin cd .. fi # THE TEST # Run Zope instance in the background zope-virtualenv/instance/bin/runzope & # Give Zope some time to start up sleep 3 # Call a few management URLs, nothing too fancy... urls=" http://admin:admin@localhost:8080/Control_Panel/manage_main http://admin:admin@localhost:8080/Control_Panel/Database/main/manage_main http://admin:admin@localhost:8080/Control_Panel/Database/manage_main http://admin:admin@localhost:8080/Control_Panel/Database/main/manage_activity http://admin:admin@localhost:8080/manage http://admin:admin@localhost:8080/acl_users/manage_main http://admin:admin@localhost:8080/acl_users/manage_access " while true ; do for url in ${urls} ; do echo ${url} curl -s $url -o /dev/null done done # This test fails after about 10 requests with # Fatal Python error: ../Objects/descrobject.c:10 object at 0x??? has negative ref count -1