This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch master
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=4af5236bdd559502900c9a1f620b8668b24df565

commit 4af5236bdd559502900c9a1f620b8668b24df565
Author: Guillem Jover <[email protected]>
AuthorDate: Thu Apr 15 14:53:58 2010 +0200

    Add unpack test-cases
---
 Makefile                                           |  4 +++
 t-unpack-device/.gitignore                         |  2 ++
 t-unpack-device/Makefile                           | 26 +++++++++++++++
 .../pkg-device}/DEBIAN/control                     |  4 +--
 t-unpack-fifo/.gitignore                           |  1 +
 t-unpack-fifo/Makefile                             | 22 ++++++++++++
 .../pkg-fifo}/DEBIAN/control                       |  4 +--
 t-unpack-hardlink/.gitignore                       |  4 +++
 t-unpack-hardlink/Makefile                         | 39 ++++++++++++++++++++++
 .../pkg-hardlink}/DEBIAN/control                   |  4 +--
 t-unpack-symlink/Makefile                          | 12 +++++++
 .../pkg-symlink}/DEBIAN/control                    |  4 +--
 .../pkg-symlink}/test-file                         |  0
 t-unpack-symlink/pkg-symlink/test-symlink          |  1 +
 14 files changed, 119 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index 39bff1184..9f4f478e2 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,10 @@
 
 TESTS := \
        t-normal \
+       t-unpack-symlink \
+       t-unpack-hardlink \
+       t-unpack-fifo \
+       t-unpack-device \
        t-disappear \
        t-disappear-empty \
        t-disappear-depended \
diff --git a/t-unpack-device/.gitignore b/t-unpack-device/.gitignore
new file mode 100644
index 000000000..e0bbc6b42
--- /dev/null
+++ b/t-unpack-device/.gitignore
@@ -0,0 +1,2 @@
+test-null
+test-ram0
diff --git a/t-unpack-device/Makefile b/t-unpack-device/Makefile
new file mode 100644
index 000000000..74cb129b5
--- /dev/null
+++ b/t-unpack-device/Makefile
@@ -0,0 +1,26 @@
+PKG := pkg-device
+
+TESTS_DEB := $(PKG)
+
+include ../Test.mk
+
+$(PKG)/test-null:
+       $(BEROOT) mknod $@ c 1 3
+
+$(PKG)/test-ram0:
+       $(BEROOT) mknod $@ b 1 0
+
+build-hook: $(PKG)/test-null $(PKG)/test-ram0
+
+clean-hook:
+       rm -f $(PKG)/test-null
+       rm -f $(PKG)/test-ram0
+
+test-case:
+       # test unpacking device files
+       $(DPKG_INSTALL) pkg-device.deb
+       test "`$(PKG_STATUS) pkg-device`" = "install ok installed"
+
+test-clean:
+       $(DPKG_PURGE) pkg-device
+
diff --git a/t-disappear-depended/pkg-disappear/DEBIAN/control 
b/t-unpack-device/pkg-device/DEBIAN/control
similarity index 63%
copy from t-disappear-depended/pkg-disappear/DEBIAN/control
copy to t-unpack-device/pkg-device/DEBIAN/control
index d8b9b28cb..988eedef9 100644
--- a/t-disappear-depended/pkg-disappear/DEBIAN/control
+++ b/t-unpack-device/pkg-device/DEBIAN/control
@@ -1,8 +1,8 @@
-Package: pkg-disappear
+Package: pkg-device
 Version: 0.0-1
 Section: test
 Priority: extra
 Maintainer: Guillem Jover <[email protected]>
 Architecture: all
-Description: test package - disappear
+Description: test package - devices unpack
 
diff --git a/t-unpack-fifo/.gitignore b/t-unpack-fifo/.gitignore
new file mode 100644
index 000000000..b9ff94d35
--- /dev/null
+++ b/t-unpack-fifo/.gitignore
@@ -0,0 +1 @@
+test-fifo
diff --git a/t-unpack-fifo/Makefile b/t-unpack-fifo/Makefile
new file mode 100644
index 000000000..054bdd20f
--- /dev/null
+++ b/t-unpack-fifo/Makefile
@@ -0,0 +1,22 @@
+PKG := pkg-fifo
+
+TESTS_DEB := pkg-fifo
+
+include ../Test.mk
+
+$(PKG)/test-fifo:
+       mkfifo $@
+
+build-hook: $(PKG)/test-fifo
+
+clean-hook:
+       rm -f $(PKG)/test-fifo
+
+test-case:
+       # test unpacking a fifo
+       $(DPKG_INSTALL) pkg-fifo.deb
+       test "`$(PKG_STATUS) pkg-fifo`" = "install ok installed"
+
+test-clean:
+       $(DPKG_PURGE) pkg-fifo
+
diff --git a/t-disappear-empty/pkg-disappear-0/DEBIAN/control 
b/t-unpack-fifo/pkg-fifo/DEBIAN/control
similarity index 64%
copy from t-disappear-empty/pkg-disappear-0/DEBIAN/control
copy to t-unpack-fifo/pkg-fifo/DEBIAN/control
index d8b9b28cb..374d398bf 100644
--- a/t-disappear-empty/pkg-disappear-0/DEBIAN/control
+++ b/t-unpack-fifo/pkg-fifo/DEBIAN/control
@@ -1,8 +1,8 @@
-Package: pkg-disappear
+Package: pkg-fifo
 Version: 0.0-1
 Section: test
 Priority: extra
 Maintainer: Guillem Jover <[email protected]>
 Architecture: all
-Description: test package - disappear
+Description: test package - unpacking fifo
 
diff --git a/t-unpack-hardlink/.gitignore b/t-unpack-hardlink/.gitignore
new file mode 100644
index 000000000..261cc473b
--- /dev/null
+++ b/t-unpack-hardlink/.gitignore
@@ -0,0 +1,4 @@
+test-file-link*
+test-fifo-link*
+test-null-link*
+test-ram0-link*
diff --git a/t-unpack-hardlink/Makefile b/t-unpack-hardlink/Makefile
new file mode 100644
index 000000000..0db7d3fbd
--- /dev/null
+++ b/t-unpack-hardlink/Makefile
@@ -0,0 +1,39 @@
+PKG := pkg-hardlink
+
+TESTS_DEB := $(PKG)
+
+include ../Test.mk
+
+$(PKG)/test-file-link0:
+       echo "test hard linked file" >$@
+       link $@ $(PKG)/test-file-link1
+
+$(PKG)/test-fifo-link0:
+       mkfifo $@
+       link $@ $(PKG)/test-fifo-link1
+
+$(PKG)/test-null-link0:
+       $(BEROOT) mknod $@ c 1 3
+       link $@ $(PKG)/test-null-link1
+
+$(PKG)/test-ram0-link0:
+       $(BEROOT) mknod $@ b 1 0
+       link $@ $(PKG)/test-ram0-link1
+
+build-hook: $(PKG)/test-file-link0 $(PKG)/test-fifo-link0 \
+            $(PKG)/test-null-link0 $(PKG)/test-ram0-link0
+
+clean-hook:
+       rm -f $(PKG)/test-file-link0 $(PKG)/test-file-link1
+       rm -f $(PKG)/test-fifo-link0 $(PKG)/test-fifo-link1
+       rm -f $(PKG)/test-null-link0 $(PKG)/test-null-link1
+       rm -f $(PKG)/test-ram0-link0 $(PKG)/test-ram0-link1
+
+test-case:
+       # test unpacking hardlinks
+       $(DPKG_INSTALL) pkg-hardlink.deb
+       test "`$(PKG_STATUS) pkg-hardlink`" = "install ok installed"
+
+test-clean:
+       $(DPKG_PURGE) pkg-hardlink
+
diff --git a/t-disappear-depended/pkg-disappear/DEBIAN/control 
b/t-unpack-hardlink/pkg-hardlink/DEBIAN/control
similarity index 62%
copy from t-disappear-depended/pkg-disappear/DEBIAN/control
copy to t-unpack-hardlink/pkg-hardlink/DEBIAN/control
index d8b9b28cb..99f0e49b4 100644
--- a/t-disappear-depended/pkg-disappear/DEBIAN/control
+++ b/t-unpack-hardlink/pkg-hardlink/DEBIAN/control
@@ -1,8 +1,8 @@
-Package: pkg-disappear
+Package: pkg-hardlink
 Version: 0.0-1
 Section: test
 Priority: extra
 Maintainer: Guillem Jover <[email protected]>
 Architecture: all
-Description: test package - disappear
+Description: test package - unpack hardlinks
 
diff --git a/t-unpack-symlink/Makefile b/t-unpack-symlink/Makefile
new file mode 100644
index 000000000..be5d4d791
--- /dev/null
+++ b/t-unpack-symlink/Makefile
@@ -0,0 +1,12 @@
+TESTS_DEB := pkg-symlink
+
+include ../Test.mk
+
+test-case:
+       # test unpacking symlinks
+       $(DPKG_INSTALL) pkg-symlink.deb
+       test "`$(PKG_STATUS) pkg-symlink`" = "install ok installed"
+
+test-clean:
+       $(DPKG_PURGE) pkg-symlink
+
diff --git a/t-symlink-dir/pkg-symlink-0/DEBIAN/control 
b/t-unpack-symlink/pkg-symlink/DEBIAN/control
similarity index 63%
copy from t-symlink-dir/pkg-symlink-0/DEBIAN/control
copy to t-unpack-symlink/pkg-symlink/DEBIAN/control
index 862243398..3694b491d 100644
--- a/t-symlink-dir/pkg-symlink-0/DEBIAN/control
+++ b/t-unpack-symlink/pkg-symlink/DEBIAN/control
@@ -1,8 +1,8 @@
 Package: pkg-symlink
-Version: 0
+Version: 0.0-1
 Section: test
 Priority: extra
 Maintainer: Guillem Jover <[email protected]>
 Architecture: all
-Description: test package - package with symlink to dir
+Description: test package - unpack symlink
 
diff --git a/t-dir-extension-check/pkg-dbg-dir/test-file 
b/t-unpack-symlink/pkg-symlink/test-file
similarity index 100%
copy from t-dir-extension-check/pkg-dbg-dir/test-file
copy to t-unpack-symlink/pkg-symlink/test-file
diff --git a/t-unpack-symlink/pkg-symlink/test-symlink 
b/t-unpack-symlink/pkg-symlink/test-symlink
new file mode 120000
index 000000000..d30ea1846
--- /dev/null
+++ b/t-unpack-symlink/pkg-symlink/test-symlink
@@ -0,0 +1 @@
+test-file
\ No newline at end of file

-- 
Dpkg.Org's dpkg

Reply via email to