summaryrefslogtreecommitdiff
path: root/build/build.c
diff options
context:
space:
mode:
Diffstat (limited to 'build/build.c')
-rw-r--r--build/build.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/build/build.c b/build/build.c
index e5625f96c..a8d8c9810 100644
--- a/build/build.c
+++ b/build/build.c
@@ -96,6 +96,12 @@ int doScript(Spec spec, int what, const char *name, StringBuf sb, int test)
mTemplate = "%{__spec_install_template}";
mPost = "%{__spec_install_post}";
break;
+ case RPMBUILD_CHECK:
+ name = "%check";
+ sb = spec->check;
+ mTemplate = "%{__spec_check_template}";
+ mPost = "%{__spec_check_post}";
+ break;
case RPMBUILD_CLEAN:
name = "%clean";
sb = spec->clean;
@@ -296,6 +302,10 @@ int buildSpec(Spec spec, int what, int test)
(rc = doScript(spec, RPMBUILD_INSTALL, NULL, NULL, test)))
goto exit;
+ if ((what & RPMBUILD_CHECK) &&
+ (rc = doScript(spec, RPMBUILD_CHECK, NULL, NULL, test)))
+ goto exit;
+
if ((what & RPMBUILD_PACKAGESOURCE) &&
(rc = processSourceFiles(spec)))
goto exit;