btrfs-progs: Add test

This commit is contained in:
Christian Kampka 2022-01-24 21:39:11 +01:00
parent a3d54dece7
commit de07108f8e
No known key found for this signature in database
GPG Key ID: B88E140DB4FE1AA5

View File

@ -2,6 +2,7 @@
, asciidoc, docbook_xml_dtd_45, docbook_xsl, libxslt, pkg-config, python3, xmlto , asciidoc, docbook_xml_dtd_45, docbook_xsl, libxslt, pkg-config, python3, xmlto
, zstd , zstd
, acl, attr, e2fsprogs, libuuid, lzo, systemd, zlib , acl, attr, e2fsprogs, libuuid, lzo, systemd, zlib
, runCommand, btrfs-progs
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -37,6 +38,15 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true; enableParallelBuilding = true;
passthru.tests = {
simple-filesystem = runCommand "btrfs-progs-create-fs" {} ''
mkdir -p $out
truncate -s110M $out/disc
${btrfs-progs}/bin/mkfs.btrfs $out/disc | tee $out/success
${btrfs-progs}/bin/btrfs check $out/disc | tee $out/success
[ -e $out/success ]
'';
};
meta = with lib; { meta = with lib; {
description = "Utilities for the btrfs filesystem"; description = "Utilities for the btrfs filesystem";
homepage = "https://btrfs.wiki.kernel.org/"; homepage = "https://btrfs.wiki.kernel.org/";