lsd: move nixos test to installCheckPhase

+12 -15
-1
nixos/tests/all-tests.nix
··· 237 locate = handleTest ./locate.nix {}; 238 login = handleTest ./login.nix {}; 239 loki = handleTest ./loki.nix {}; 240 - lsd = handleTest ./lsd.nix {}; 241 lxd = handleTest ./lxd.nix {}; 242 lxd-nftables = handleTest ./lxd-nftables.nix {}; 243 #logstash = handleTest ./logstash.nix {};
··· 237 locate = handleTest ./locate.nix {}; 238 login = handleTest ./login.nix {}; 239 loki = handleTest ./loki.nix {}; 240 lxd = handleTest ./lxd.nix {}; 241 lxd-nftables = handleTest ./lxd-nftables.nix {}; 242 #logstash = handleTest ./logstash.nix {};
-12
nixos/tests/lsd.nix
··· 1 - import ./make-test-python.nix ({ pkgs, ... }: { 2 - name = "lsd"; 3 - meta = with pkgs.lib.maintainers; { maintainers = [ nequissimus ]; }; 4 - 5 - nodes.lsd = { pkgs, ... }: { environment.systemPackages = [ pkgs.lsd ]; }; 6 - 7 - testScript = '' 8 - lsd.succeed('echo "abc" > /tmp/foo') 9 - assert "4 B /tmp/foo" in lsd.succeed('lsd --classic --blocks "size,name" -l /tmp/foo') 10 - assert "lsd ${pkgs.lsd.version}" in lsd.succeed("lsd --version") 11 - ''; 12 - })
···
+12 -2
pkgs/tools/misc/lsd/default.nix
··· 1 { lib 2 - , nixosTests 3 , fetchFromGitHub 4 , rustPlatform 5 , installShellFiles ··· 26 # Found argument '--test-threads' which wasn't expected, or isn't valid in this context 27 doCheck = false; 28 29 - passthru.tests = { inherit (nixosTests) lsd; }; 30 31 meta = with lib; { 32 homepage = "https://github.com/Peltoche/lsd";
··· 1 { lib 2 , fetchFromGitHub 3 , rustPlatform 4 , installShellFiles ··· 25 # Found argument '--test-threads' which wasn't expected, or isn't valid in this context 26 doCheck = false; 27 28 + doInstallCheck = true; 29 + installCheckPhase = '' 30 + runHook preInstallCheck 31 + 32 + testFile=$(mktemp /tmp/lsd-test.XXXX) 33 + echo 'abc' > $testFile 34 + $out/bin/lsd --classic --blocks "size,name" -l $testFile | grep "4 B $testFile" 35 + $out/bin/lsd --version | grep "${version}" 36 + rm $testFile 37 + 38 + runHook postInstallCheck 39 + ''; 40 41 meta = with lib; { 42 homepage = "https://github.com/Peltoche/lsd";