Martin Sivák has uploaded a new change for review. Change subject: Add make test, make it work and use it in rpm build ......................................................................
Add make test, make it work and use it in rpm build Change-Id: If7162928be49d1f505abc44d8f61c1d17b18de5b Signed-off-by: Martin Sivak <[email protected]> --- M Makefile.am M ovirt-hosted-engine-ha.spec.in A ovirt_hosted_engine_ha/broker/test/__init__.py M ovirt_hosted_engine_ha/broker/test/test_monitor.py 4 files changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-hosted-engine-ha refs/changes/20/24820/1 diff --git a/Makefile.am b/Makefile.am index bce7029..697fb61 100644 --- a/Makefile.am +++ b/Makefile.am @@ -78,6 +78,9 @@ @echo "rpm(s) available at '$(TMPREPOS)'" @echo +test: + nosetests . + clean-local: rm -fr "$(TMPREPOS)" rm -fr target diff --git a/ovirt-hosted-engine-ha.spec.in b/ovirt-hosted-engine-ha.spec.in index 7fa5964..7d92c42 100644 --- a/ovirt-hosted-engine-ha.spec.in +++ b/ovirt-hosted-engine-ha.spec.in @@ -55,6 +55,7 @@ Requires: vdsm-python >= 4.12.2 BuildRequires: python2-devel +BuildRequires: python-nose %if 0%{?with_systemd} %systemd_requires @@ -77,6 +78,8 @@ %{?conf} make %{?_smp_mflags} +%check +make test %install rm -rf "%{buildroot}" diff --git a/ovirt_hosted_engine_ha/broker/test/__init__.py b/ovirt_hosted_engine_ha/broker/test/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/ovirt_hosted_engine_ha/broker/test/__init__.py diff --git a/ovirt_hosted_engine_ha/broker/test/test_monitor.py b/ovirt_hosted_engine_ha/broker/test/test_monitor.py index 2344e2d..3cd74da 100644 --- a/ovirt_hosted_engine_ha/broker/test/test_monitor.py +++ b/ovirt_hosted_engine_ha/broker/test/test_monitor.py @@ -20,14 +20,14 @@ import logging import time -import broker.monitor +from .. import monitor def main(): logging.basicConfig(filename='/dev/stdout', filemode='w+', level=logging.DEBUG) log = logging.getLogger("%s.monitor test" % __name__) log.warn("Could not init proper logging", exc_info=True) - m = broker.monitor.Monitor() + m = monitor.Monitor() sm_id = m.start_submonitor('ping', {'addr': '127.0.0.1'}) m.stop_submonitor(sm_id) -- To view, visit http://gerrit.ovirt.org/24820 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If7162928be49d1f505abc44d8f61c1d17b18de5b Gerrit-PatchSet: 1 Gerrit-Project: ovirt-hosted-engine-ha Gerrit-Branch: ovirt-hosted-engine-ha-1.1 Gerrit-Owner: Martin Sivák <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
