chiark / gitweb /
Add test_patches target to Makefile
authorCatalin Marinas <catalin.marinas@gmail.com>
Sun, 8 Jun 2008 22:20:16 +0000 (23:20 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Sun, 8 Jun 2008 22:20:16 +0000 (23:20 +0100)
This target tests individual patches in the series.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Makefile

index c890b8ed0a786b0be48661c7b9837d1eb6d0ebdb..e5c002aec79fa87e97ab50aa082e260b9ac9ecad 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,8 @@ PREFIX  ?= $(HOME)
 DESTDIR        ?= /
 PYTHON ?= python
 
+TEST_PATCHES ?= ..
+
 all:
        $(PYTHON) setup.py build
 
@@ -14,6 +16,11 @@ doc:
 test:
        cd t && $(MAKE) all
 
+test_patches:
+       for patch in $$(stg series --noprefix $(TEST_PATCHES)); do \
+               stg goto $$patch && $(MAKE) test || break; \
+       done
+
 clean:
        for dir in Documentation t; do \
                (cd $$dir && $(MAKE) clean); \
@@ -26,4 +33,4 @@ clean:
 tags:
        ctags -e -R stgit/*
 
-.PHONY: all install doc test clean
+.PHONY: all install doc test test_patches clean