packaging: refine unit tests
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Thu, 18 Apr 2013 11:35:17 +0000 (14:35 +0300)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Thu, 18 Apr 2013 12:29:17 +0000 (15:29 +0300)
Don't force do_unittests in spec. Also, fake username and email in
'%check' section to work around unconfigured git.

Change-Id: Ibb0da9d8a40eb15e517c293c225577f5c28f3c54
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
packaging/obs-service-git-buildpackage.spec

index a88bbad6f8d76cd0c127ddf613f1755db59b23c8..12585b6670f2902eaf715f3e4919677d6c30c52e 100644 (file)
@@ -1,5 +1,3 @@
-%define do_unittests 0
-
 Name:           obs-service-git-buildpackage
 License:        GPL-2.0+
 Group:          Development/Tools/Building
@@ -35,7 +33,9 @@ files that are managed with git-buildpackage tools.
 
 %if 0%{?do_unittests}
 %check
-%{__python} setup.py nosetests
+GIT_AUTHOR_EMAIL=rpmbuild@example.com GIT_AUTHOR_NAME=rpmbuild \
+    GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL \
+    %{__python} setup.py nosetests
 %endif