summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--HACKING19
-rw-r--r--Makefile.am12
-rw-r--r--tests/Makefile.am14
3 files changed, 44 insertions, 1 deletions
diff --git a/HACKING b/HACKING
new file mode 100644
index 0000000..4ce8ae1
--- /dev/null
+++ b/HACKING
@@ -0,0 +1,19 @@
+Tests
+===
+
+'make check' execute all tests
+
+'make check TEST_NAMES="test_gi"' executes the tests in test_gi.py
+
+'make check TEST_NAMES="test_gi.TestUtf8"' executes the tests in test_gi.TestUtf8
+
+'make check TEST_NAMES="test_gi.TestUtf8.test_utf8_full_return"' executes the test_gi.TestUtf8.test_utf8_full_return test
+
+'make check.gdb' executes all the tests in a gdb session
+
+'make test_gi.TestUtf8.gdb' executes all the tests in test_gi.TestUtf8 in a gdb session
+
+'make check.valgrind' executes all the tests in valgrind
+
+'make test_gi.TestUtf8.valgrind' executes all the tests in test_gi.TestUtf8 in valgrind
+
diff --git a/Makefile.am b/Makefile.am
index cbe9000..6f1e959 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,3 +8,15 @@ SUBDIRS = \
gi \
tests
+check.gdb:
+ cd tests && $(MAKE) check.gdb
+
+%.gdb:
+ cd tests && $(MAKE) $*.gdb
+
+check.valgrind:
+ cd tests && $(MAKE) check.valgrind
+
+%.valgrind:
+ cd tests && $(MAKE) $*.valgrind
+
diff --git a/tests/Makefile.am b/tests/Makefile.am
index e3eb633..bf59be1 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -4,5 +4,17 @@ noinst_PYTHON = \
check-local:
LD_LIBRARY_PATH=$(srcdir)/.libs$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH} \
- $(PYTHON) $(srcdir)/runtests.py $$TEST_NAMES
+ $(EXEC_NAME) $(PYTHON) $(srcdir)/runtests.py $(TEST_NAMES)
+
+check.gdb:
+ EXEC_NAME="gdb --args" $(MAKE) check
+
+%.gdb:
+ EXEC_NAME="gdb --args" TEST_NAMES=$* $(MAKE) check
+
+check.valgrind:
+ EXEC_NAME="valgrind" $(MAKE) check
+
+%.valgrind:
+ EXEC_NAME="valgrind" TEST_NAMES=$* $(MAKE) check