Created
November 13, 2018 15:35
-
-
Save 4383/7e7f28770a9c1fb4ede47926d5fda195 to your computer and use it in GitHub Desktop.
mastering tox debuging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# assuming that I run the unit test of oslo.service | |
# https://github.com/openstack/oslo.service | |
# if you want to do the same things you need first to clone the oslo.service project | |
# to initialize tox environment you need to first tox basicaly | |
tox -e py35 | |
# now your environment is setup you can run individual test by using testtools like this | |
.tox/py35/bin/python -m testtools.run oslo_service.tests.test_service.ServiceLauncherTest.test_child_signal_sighup | |
# this test is very long test and you can monitor resources usage by executing | |
# the following command. | |
# The following command track all process PID attached to this test execution | |
# and use htop (you can also use top) to display informations | |
htop $(ps ax | grep testtools | grep -v grep | awk '{ printf "-p %s ", $1 }') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment