summaryrefslogtreecommitdiffstats
path: root/t/data/SPECS/buildroot_define.spec
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-12-17 17:21:43 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-12-17 17:21:43 +0000
commite1710658999029bb7de1d8ad73800f6f0fe2cf40 (patch)
tree7c16e092e692160046d60f50ffaa961cbdbd7e67 /t/data/SPECS/buildroot_define.spec
parent9f354bbfd4afef428d5f60a6f1bd9a7f2261f101 (diff)
downloadurpmi-e1710658999029bb7de1d8ad73800f6f0fe2cf40.tar
urpmi-e1710658999029bb7de1d8ad73800f6f0fe2cf40.tar.gz
urpmi-e1710658999029bb7de1d8ad73800f6f0fe2cf40.tar.bz2
urpmi-e1710658999029bb7de1d8ad73800f6f0fe2cf40.tar.xz
urpmi-e1710658999029bb7de1d8ad73800f6f0fe2cf40.zip
add some tests for %buildroot, %defaultbuildroot, BuildRoot
Diffstat (limited to 't/data/SPECS/buildroot_define.spec')
-rw-r--r--t/data/SPECS/buildroot_define.spec34
1 files changed, 34 insertions, 0 deletions
diff --git a/t/data/SPECS/buildroot_define.spec b/t/data/SPECS/buildroot_define.spec
new file mode 100644
index 00000000..1b8cd33c
--- /dev/null
+++ b/t/data/SPECS/buildroot_define.spec
@@ -0,0 +1,34 @@
+%define macro_using_buildroot $(echo %buildroot)
+
+%define buildroot %{_tmppath}/TESTING
+
+Summary: x
+Name: buildroot_define
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+
+%description
+x
+
+%package sub
+
+Summary: x
+Group: x
+Version: 2
+
+%description sub
+x
+
+
+%install
+wanted=%{_tmppath}/TESTING
+[ "%buildroot" = $wanted ] || { echo "buildroot should be $wanted instead of %buildroot"; exit 1; }
+[ "$RPM_BUILD_ROOT" = $wanted ] || { echo "RPM_BUILD_ROOT should be $wanted instead of $RPM_BUILD_ROOT"; exit 1; }
+[ "%macro_using_buildroot" = $wanted ] || { echo "macro_using_buildroot should be $wanted instead of %buildroot"; exit 1; }
+
+install -d $RPM_BUILD_ROOT
+
+%files