summaryrefslogtreecommitdiffstats
path: root/nixos/tests/ccache.nix
blob: e78081a4e5fc3fd021ae5cdfa4a4886174b4db82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import ./make-test-python.nix (
  { pkgs, ... }:
  {
    name = "ccache";

    nodes.machine =
      { ... }:
      {
        imports = [ ../modules/profiles/minimal.nix ];
        environment.systemPackages = [ pkgs.hello ];
        programs.ccache = {
          enable = true;
          packageNames = [ "hello" ];
        };
      };

    testScript = ''
      start_all()
      machine.wait_for_unit("multi-user.target")
      machine.succeed("nix-ccache --show-stats")
      machine.succeed("hello")
      machine.shutdown()
    '';
  }
)