diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2014-08-18 15:24:02 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2014-08-18 16:55:31 +0300 |
commit | 6638e1f5d4fe0508949b4418fa5a26bbcb3a86ab (patch) | |
tree | 22226016b16cea54c0a1b1984a51e5e784c0840a | |
parent | 27f6668097aa687be3e68b1001a5263f72fb40d8 (diff) | |
download | rpm-6638e1f5d4fe0508949b4418fa5a26bbcb3a86ab.tar.gz |
Add a simple testcase for buildrequires functionality
(cherry picked from commit 2d2b90b5babe17ea90556901d9d65b2166374df4)
-rw-r--r-- | tests/data/SPECS/deptest.spec | 2 | ||||
-rw-r--r-- | tests/rpmbuild.at | 18 |
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/data/SPECS/deptest.spec b/tests/data/SPECS/deptest.spec index 7c47f6db6..f7b3a55e3 100644 --- a/tests/data/SPECS/deptest.spec +++ b/tests/data/SPECS/deptest.spec @@ -14,6 +14,8 @@ BuildArch: noarch %{?sugs:Suggests: %{sugs}} %{?sups:Supplements: %{sups}} %{?ens:Enhances: %{ens}} +%{?buildreq:BuildRequires: %{buildreqs}} +%{?buildcfls:BuildConflicts: %{buildcfls}} %description %{summary} diff --git a/tests/rpmbuild.at b/tests/rpmbuild.at index 183e40e48..e5bd63d67 100644 --- a/tests/rpmbuild.at +++ b/tests/rpmbuild.at @@ -215,3 +215,21 @@ zap = 3 ], [ignore]) AT_CLEANUP + +# ------------------------------ +# Test BuildRequire functionality +AT_SETUP([Build requires]) +AT_KEYWORDS([build]) +AT_CHECK([ + +runroot rpmbuild -bb --quiet \ + --define "pkg buildreq" \ + --define "buildreqs foo > 1.2.3" \ + /data/SPECS/deptest.spec +], +[1], +[], +[error: Failed build dependencies: + zoo > 1.2.3 is needed by deptest-buildreq-1.0-1.noarch +]) +AT_CLEANUP |