Add couple of tar build tests + another version of hello tarball
authorPanu Matilainen <pmatilai@redhat.com>
Sat, 22 Nov 2008 09:45:55 +0000 (11:45 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Sat, 22 Nov 2008 09:45:55 +0000 (11:45 +0200)
tests/data/SOURCES/hello-2.0.tar.gz [new file with mode: 0644]
tests/rpmbuild.at

diff --git a/tests/data/SOURCES/hello-2.0.tar.gz b/tests/data/SOURCES/hello-2.0.tar.gz
new file mode 100644 (file)
index 0000000..84976e2
Binary files /dev/null and b/tests/data/SOURCES/hello-2.0.tar.gz differ
index 4a672b2..0d26b69 100644 (file)
@@ -83,3 +83,33 @@ run rpmbuild \
 [ignore],
 [ignore])
 AT_CLEANUP
+
+# ------------------------------
+# Check if tar unpacking works
+AT_SETUP([rpmbuild -tb <tar with bad spec>])
+AT_CHECK([
+rm -rf ${TOPDIR}
+
+run rpmbuild \
+  -tb "${RPMDATA}/SOURCES/hello-1.0.tar.gz"
+],
+[1],
+[ignore],
+[error: line 5: Unknown tag: Serial:   1
+])
+AT_CLEANUP
+
+# ------------------------------
+# Check if tar build works
+# TODO: test that the rpms are actually created...
+AT_SETUP([rpmbuild -tb])
+AT_CHECK([
+rm -rf ${TOPDIR}
+
+run rpmbuild \
+  -ta "${RPMDATA}/SOURCES/hello-2.0.tar.gz"
+],
+[0],
+[ignore],
+[ignore])
+AT_CLEANUP