[node-patches] Change in ovirt-node[master]: test: Add basic unit test infrasturcture
fabiand at fedoraproject.org
fabiand at fedoraproject.org
Fri Jun 7 13:57:10 UTC 2013
Fabian Deutsch has uploaded a new change for review.
Change subject: test: Add basic unit test infrasturcture
......................................................................
test: Add basic unit test infrasturcture
Change-Id: I3c3419a3c045a9afe76dd42508e743426d1f98c6
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M Makefile.am
M configure.ac
A tests/Makefile.am
3 files changed, 36 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/40/15440/1
diff --git a/Makefile.am b/Makefile.am
index 11aac64..894cbe5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,9 +17,6 @@
OVIRT_CACHE_DIR ?= $(HOME)/ovirt-cache
-PYTHONSOURCES = \
- $(shell find scripts -name \*.py)
-
SHELL := /bin/bash
SUBDIRS = \
@@ -33,7 +30,8 @@
logrotate \
plugins \
modules \
- tools
+ tools \
+ tests
EXTRA_DIST = \
libvirtd.service \
@@ -75,10 +73,14 @@
.PHONY: rpms publish srpms
-check-local: static-checks
+check-local: static-checks unittests
@echo Passed $@
static-checks:
- $(MAKE) -C src check-local
+ $(MAKE) -C src/ check-local
+
+unittests:
+ $(MAKE) -C tests/ check-local
+
# vim: ts=2
diff --git a/configure.ac b/configure.ac
index 81a077a..2b3424e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -76,6 +76,7 @@
logrotate/Makefile
modules/Makefile
plugins/Makefile
+ tests/Makefile
$MAIN_KS
recipe/image-minimizer.ks
scripts/ovirt-functions
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..a98b225
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,27 @@
+# Copyright (C) 2013 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301, USA. A copy of the GNU General Public License is
+# also available at http://www.gnu.org/copyleft/gpl.html.
+
+PYTHONUNITTESTS:=$(shell find unit_tests/ -name \*.py)
+
+check-local: unittests
+ @echo Passed $@
+
+unittests: $(PYTHONUNITTESTS:%=%.nose)
+ @echo Passed $@
+
+%.nose:
+ PYTHONPATH=$(top_srcdir)/src nosetests -v "$*"
\ No newline at end of file
--
To view, visit http://gerrit.ovirt.org/15440
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c3419a3c045a9afe76dd42508e743426d1f98c6
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>
More information about the node-patches
mailing list