summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-02-07 09:35:08 +0100
committerChristoph Reiter <reiter.christoph@gmail.com>2018-02-07 09:35:08 +0100
commit1330712bcf8109090bacf0cdfbba0c2a47930ac9 (patch)
treefa5f50e4be1e48ac9960cbe0ac6958bd2e3a1d35 /docs
parente6ffd8f37c83d2627086207192030975dee44bd7 (diff)
downloadpygobject-1330712bcf8109090bacf0cdfbba0c2a47930ac9.tar.gz
docs: update building/testing with new setup.py features
Diffstat (limited to 'docs')
-rw-r--r--docs/devguide/building_testing.rst45
1 files changed, 25 insertions, 20 deletions
diff --git a/docs/devguide/building_testing.rst b/docs/devguide/building_testing.rst
index 901f3ea4..f3ac215a 100644
--- a/docs/devguide/building_testing.rst
+++ b/docs/devguide/building_testing.rst
@@ -5,50 +5,55 @@ Building & Testing
Using Autotools
---------------
-Building for Python 2:
-
-::
+.. code:: shell
+ # Building for Python 2
./autogen.sh --with-python=python2
make
-Building for Python 3:
-
-::
-
+ # Building for Python 3
./autogen.sh --with-python=python3
make
+ # Executing some code after the build
+ PYTHONPATH=. python3 foo.py
-To run the test suite::
-
+ # To run the test suite
make check
-To test only a specific file/class/function::
-
+ # To test only a specific file/class/function::
make check TEST_NAMES=test_gi
make check TEST_NAMES=test_gi.TestUtf8
make check TEST_NAMES=test_gi.TestUtf8.test_utf8_full_return
-To execute all the tests in a gdb session::
-
+ # To execute all the tests in a gdb session
make check.gdb
-To executes all the tests in valgrind::
-
+ # To executes all the tests in valgrind
make check.valgrind
-To execute flake8 tests::
-
+ # To execute flake8 tests
make check.quality
Using Setuptools
----------------
-Building and testing in the source directory:
+.. code:: shell
+
+ # Build in-tree
+ python3 setup.py build_ext --inplace
-::
+ # Executing some code after the build
+ PYTHONPATH=. python3 foo.py
- python2 setup.py test
+ # Running tests
python3 setup.py test
+
+ # To test only a specific file/class/function::
+ TEST_NAMES=test_gi python3 python3 setup.py test
+ TEST_NAMES=test_gi.TestUtf8 python3 setup.py test
+ TEST_NAMES=test_gi.TestUtf8.test_utf8_full_return python3 setup.py test
+
+ # Running flake8 tests
+ python3 setup.py quality