[Openstack] How to set up the unit test environment of cinder?

Bill Owen billowen at us.ibm.com
Thu Jul 25 13:08:31 UTC 2013


Hi,
There have been some changes in the test environment lately that could be
causing your problem.  I usually run tests using a virtual environment
(without the "-N"  or no virtual environnment flag).  You might try that,
and have the test environment re-initialized with the latest required
packages (as specified in test-requirements.txt & requirements.txt).

Or, you can double check that you do have current set of test requirements
installed using the command:
$ pip install -r test-requirements.txt

Hope that helps -

Regards,
Bill Owen
billowen at us.ibm.com
Strategic Test Methods and Tools
520-799-4829, T/L 321-4829




From:	"Zhangzan (zana)" <zana.zhangzan at huawei.com>
To:	"openstack at lists.launchpad.net" <openstack at lists.launchpad.net>
Cc:	Zhoushigang <zhoushigang at huawei.com>
Date:	07/25/2013 02:48 AM
Subject:	[Openstack] How to set up the unit test environment of cinder?
Sent by:	"Openstack" <openstack-bounces
            +billowen=us.ibm.com at lists.launchpad.net>



Hi

Can anyone tell me how to set up cinder unit test environment?

Usually, I download the cinder code and run script run_test.sh.
But, now it can not work. This is the error msg:

root at ubuntu:/home/cinder-master# ./run_tests.sh -N -P
Running ` python setup.py testr --testr-args='--subunit --concurrency 1  '`
bash: tools/colorizer.py: Permission denied
Traceback (most recent call last):
  File "/usr/local/bin/subunit-2to1", line 5, in <module>
    pkg_resources.run_script('python-subunit==0.0.13', 'subunit-2to1')
  File  "/usr/lib/python2.7/dist-packages/pkg_resources.py",  line  505, in
run_script
    self.require(requires)[0].run_script(script_name, ns)
  File  "/usr/lib/python2.7/dist-packages/pkg_resources.py",  line 1245, in
run_script
    execfile(script_filename, namespace, namespace)
  File
"/usr/local/lib/python2.7/dist-packages/python_subunit-0.0.13-py2.7.egg/EGG-INFO/scripts/subunit-2to1",
 line 46, in <module>
    main()
  File
"/usr/local/lib/python2.7/dist-packages/python_subunit-0.0.13-py2.7.egg/EGG-INFO/scripts/subunit-2to1",
 line 40, in main
    case.run(result)
  File
"/usr/local/lib/python2.7/dist-packages/python_subunit-0.0.13-py2.7.egg/subunit/v2.py",
 line 255, in run
    self._parse_packet(result)
  File
"/usr/local/lib/python2.7/dist-packages/python_subunit-0.0.13-py2.7.egg/subunit/v2.py",
 line 324, in _parse_packet
    self._parse(packet, result)
  File
"/usr/local/lib/python2.7/dist-packages/python_subunit-0.0.13-py2.7.egg/subunit/v2.py",
 line 440, in _parse
    route_code=route_code, timestamp=timestamp)
  File
"/usr/local/lib/python2.7/dist-packages/testtools-0.9.32-py2.7.egg/testtools/testresult/real.py",
 line 1441, in status
    test_id=test_id, test_status=test_status, *args, **kwargs)
  File
"/usr/local/lib/python2.7/dist-packages/testtools-0.9.32-py2.7.egg/testtools/testresult/real.py",
 line 651, in status
    self.on_test(self._inprogress.pop(key))
  File
"/usr/local/lib/python2.7/dist-packages/testtools-0.9.32-py2.7.egg/testtools/testresult/real.py",
 line 1453, in _handle_tests
    case.run(self.decorated)
  File
"/usr/local/lib/python2.7/dist-packages/testtools-0.9.32-py2.7.egg/testtools/testcase.py",
 line 678, in run
    result.startTest(self)
  File
"/usr/local/lib/python2.7/dist-packages/testtools-0.9.32-py2.7.egg/testtools/testresult/real.py",
 line 1247, in startTest
    return self.decorated.startTest(test)
  File
"/usr/local/lib/python2.7/dist-packages/testtools-0.9.32-py2.7.egg/testtools/testresult/real.py",
 line 1247, in startTest
    return self.decorated.startTest(test)
  File
"/usr/local/lib/python2.7/dist-packages/python_subunit-0.0.13-py2.7.egg/subunit/__init__.py",
 line 764, in startTest
    self._stream.flush()
IOError: [Errno 32] Broken pipe
[Errno 32] Broken pipe
error: testr failed (3)_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : openstack at lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20130725/007fad36/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20130725/007fad36/attachment.gif>


More information about the Openstack mailing list