summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin McCarthy <kmccarth@redhat.com>2007-09-04 10:22:45 -0700
committerKevin McCarthy <kmccarth@redhat.com>2007-09-04 10:22:45 -0700
commitc85c8eede36224e72b42153708dd58a9f0610b0d (patch)
tree02da14d197ad1f2a7b1e4265a91df276952c7c8c
parent90a34f386555ca8352e38b6186136a6750517116 (diff)
downloadfreeipa-c85c8eede36224e72b42153708dd58a9f0610b0d.tar.gz
freeipa-c85c8eede36224e72b42153708dd58a9f0610b0d.tar.xz
freeipa-c85c8eede36224e72b42153708dd58a9f0610b0d.zip
Add 'test' target to makefiles. Hook up ipautil tests to run.
-rw-r--r--Makefile5
-rw-r--r--ipa-admintools/Makefile2
-rw-r--r--ipa-client/Makefile2
-rw-r--r--ipa-python/Makefile8
-rw-r--r--ipa-python/test/test_ipautil.py9
-rw-r--r--ipa-server/Makefile2
6 files changed, 26 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 93ffe09b0..95580fcbc 100644
--- a/Makefile
+++ b/Makefile
@@ -60,6 +60,11 @@ clean:
done
rm -f *~
+test:
+ @for subdir in $(SUBDIRS); do \
+ (cd $$subdir && $(MAKE) $@) || exit 1; \
+ done
+
version-update:
sed s/VERSION/$(SERV_VERSION)/ ipa-server/freeipa-server.spec.in \
> ipa-server/freeipa-server.spec
diff --git a/ipa-admintools/Makefile b/ipa-admintools/Makefile
index 69bf18537..4bed3b9a6 100644
--- a/ipa-admintools/Makefile
+++ b/ipa-admintools/Makefile
@@ -10,3 +10,5 @@ install:
clean:
rm -f *~ *.pyc
+
+test:
diff --git a/ipa-client/Makefile b/ipa-client/Makefile
index a00d30bb4..d16e53f9f 100644
--- a/ipa-client/Makefile
+++ b/ipa-client/Makefile
@@ -21,3 +21,5 @@ clean:
done
rm -f *~
rm -f ipaclient/*~
+
+test:
diff --git a/ipa-python/Makefile b/ipa-python/Makefile
index 542c50820..4b20d4bb7 100644
--- a/ipa-python/Makefile
+++ b/ipa-python/Makefile
@@ -1,6 +1,7 @@
PYTHONLIBDIR ?= $(shell python -c "from distutils.sysconfig import *; print get_python_lib()")
PACKAGEDIR ?= $(DESTDIR)/$(PYTHONLIBDIR)/ipa
CONFIGDIR ?= $(DESTDIR)/etc/ipa
+TESTS = $(wildcard test/*.py)
all: ;
@@ -15,3 +16,10 @@ install:
clean:
rm -f *~ *.pyc
+.PHONY: test
+test: $(subst .py,.tst,$(TESTS))
+
+%.tst: %.py
+ python $<
+
+
diff --git a/ipa-python/test/test_ipautil.py b/ipa-python/test/test_ipautil.py
index 16991eff8..54ff1dc26 100644
--- a/ipa-python/test/test_ipautil.py
+++ b/ipa-python/test/test_ipautil.py
@@ -17,12 +17,17 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
+import sys
+sys.path.insert(0, ".")
+
import unittest
-import ipa.ipautil
+
+import ipautil
+
class TestCIDict(unittest.TestCase):
def setUp(self):
- self.cidict = ipa.ipautil.CIDict()
+ self.cidict = ipautil.CIDict()
self.cidict["Key1"] = "val1"
self.cidict["key2"] = "val2"
self.cidict["KEY3"] = "VAL3"
diff --git a/ipa-server/Makefile b/ipa-server/Makefile
index faee6e61c..8281a552e 100644
--- a/ipa-server/Makefile
+++ b/ipa-server/Makefile
@@ -21,3 +21,5 @@ clean:
done
rm -f *~
rm -f ipaserver/*~
+
+test: