summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Festi <ffesti@redhat.com>2022-11-16 17:16:05 +0100
committerMichal Domonkos <mdomonko@redhat.com>2023-03-13 15:32:25 +0100
commit8454e982e1f754ff3d6ceaee375e70bddead40ac (patch)
treee089c2e7000a1a8ff13190c16ef03aaf4fe45f7f
parentf08ae8493812b4e6d706431c39dddff90500a389 (diff)
downloadrpm-8454e982e1f754ff3d6ceaee375e70bddead40ac.tar.gz
Test if BuildDependencies are checked for %prep
Have package build fail for rpm -bp (cherry picked from commit 8a7a4e130578b11bf8087b503c53b8633478ed86)
-rw-r--r--tests/data/SPECS/specstep.spec1
-rw-r--r--tests/rpmbuild.at8
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/data/SPECS/specstep.spec b/tests/data/SPECS/specstep.spec
index 2a4b5d0eb..52afb0291 100644
--- a/tests/data/SPECS/specstep.spec
+++ b/tests/data/SPECS/specstep.spec
@@ -3,6 +3,7 @@ Version: 1.0
Release: 1
Summary: Testing spec steps
License: GPL
+%{?preamble}
%description
%{summary}
diff --git a/tests/rpmbuild.at b/tests/rpmbuild.at
index bb3bdc168..e810c8478 100644
--- a/tests/rpmbuild.at
+++ b/tests/rpmbuild.at
@@ -56,6 +56,14 @@ runroot rpmbuild -bp /data/SPECS/specstep.spec 2>&1|grep ^Executing|cut -d: -f1
[])
AT_CHECK([
+runroot rpmbuild -bp -D "preamble BuildRequires:foo" /data/SPECS/specstep.spec 2>&1|grep ^error:
+],
+[0],
+[error: Failed build dependencies:
+],
+[])
+
+AT_CHECK([
runroot rpmbuild -br /data/SPECS/specstep.spec 2>&1|grep ^Executing|cut -d: -f1
],
[0],