summaryrefslogtreecommitdiffstats
path: root/tests/t-deb-lfs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:58:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:58:51 +0000
commitcbffab246997fb5a06211dfb706b54e5ae5bb59f (patch)
tree0573c5d96f58d74d76a49c0f2a70398e389a36d3 /tests/t-deb-lfs
parentInitial commit. (diff)
downloaddpkg-cbffab246997fb5a06211dfb706b54e5ae5bb59f.tar.xz
dpkg-cbffab246997fb5a06211dfb706b54e5ae5bb59f.zip
Adding upstream version 1.21.22.upstream/1.21.22upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/t-deb-lfs')
-rw-r--r--tests/t-deb-lfs/Makefile35
-rw-r--r--tests/t-deb-lfs/pkg-lfs/DEBIAN/control7
-rw-r--r--tests/t-deb-lfs/pkg-sfs/DEBIAN/control7
3 files changed, 49 insertions, 0 deletions
diff --git a/tests/t-deb-lfs/Makefile b/tests/t-deb-lfs/Makefile
new file mode 100644
index 0000000..4e45e1f
--- /dev/null
+++ b/tests/t-deb-lfs/Makefile
@@ -0,0 +1,35 @@
+PKG_SFS := pkg-sfs
+PKG_LFS := pkg-lfs
+
+TESTS_DEB := $(PKG_LFS) $(PKG_SFS)
+
+# This will test both the ar archive and the tar LFS support.
+DPKG_DEB_OPTIONS = -Znone
+
+include ../Test.mk
+
+$(PKG_LFS)/large-file:
+ dd if=/dev/zero of=$@ bs=1K count=5M
+
+$(PKG_SFS)/small-file:
+ yes | dd of=$@ bs=1K count=4
+
+build-hook: $(PKG_LFS)/large-file $(PKG_SFS)/small-file
+
+clean-hook:
+ $(RM) $(PKG_LFS)/large-file $(PKG_SFS)/small-file
+
+test-case:
+ # test Small File Support packages
+ $(DPKG_INSTALL) pkg-sfs.deb
+ $(call pkg_is_installed,pkg-sfs)
+ test "`stat -c%s '$(DPKG_INSTDIR)/small-file'`" = "4096"
+
+ # test Large File Support packages
+ $(DPKG_INSTALL) pkg-lfs.deb
+ $(call pkg_is_installed,pkg-lfs)
+ test "`stat -c%s '$(DPKG_INSTDIR)/large-file'`" = "5368709120"
+
+test-clean:
+ $(DPKG_PURGE) pkg-sfs
+ $(DPKG_PURGE) pkg-lfs
diff --git a/tests/t-deb-lfs/pkg-lfs/DEBIAN/control b/tests/t-deb-lfs/pkg-lfs/DEBIAN/control
new file mode 100644
index 0000000..8982f07
--- /dev/null
+++ b/tests/t-deb-lfs/pkg-lfs/DEBIAN/control
@@ -0,0 +1,7 @@
+Package: pkg-lfs
+Version: 0.0-1
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Description: test package - large file support
diff --git a/tests/t-deb-lfs/pkg-sfs/DEBIAN/control b/tests/t-deb-lfs/pkg-sfs/DEBIAN/control
new file mode 100644
index 0000000..2ccee74
--- /dev/null
+++ b/tests/t-deb-lfs/pkg-sfs/DEBIAN/control
@@ -0,0 +1,7 @@
+Package: pkg-sfs
+Version: 0.0-1
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Description: test package - small file support