git.iko.soy/typeable/nixpkgs
on master help sign in
e2fsprogs: Add test
commitca20993e76da9d1b8b45752ccdc0ccbfa56eebee authorChristian Kampka <christian@kampka.net> dateMon 24 Jan 2022, 21:54 (5 years ago) parent1b1fe46
1 file changed+10
pkgs/tools/filesystems/e2fsprogs/default.nix+10
pkgs/tools/filesystems/e2fsprogs/default.nix+10
@@ -1,5 +1,6 @@
11{ lib, stdenv, buildPackages, fetchurl, fetchpatch, pkg-config, libuuid, gettext, texinfo
22, shared ? !stdenv.hostPlatform.isStatic
3+, e2fsprogs, runCommand
34}:
45
56stdenv.mkDerivation rec {
@@ -65,6 +66,15 @@ stdenv.mkDerivation rec {
6566
6667 enableParallelBuilding = true;
6768
69+ passthru.tests = {
70+ simple-filesystem = runCommand "e2fsprogs-create-fs" {} ''
71+ mkdir -p $out
72+ truncate -s10M $out/disc
73+ ${e2fsprogs}/bin/mkfs.ext4 $out/disc | tee $out/success
74+ ${e2fsprogs}/bin/e2fsck -n $out/disc | tee $out/success
75+ [ -e $out/success ]
76+ '';
77+ };
6878 meta = with lib; {
6979 homepage = "http://e2fsprogs.sourceforge.net/";
7080 description = "Tools for creating and checking ext2/ext3/ext4 filesystems";