From e7d3db0954a744a06bce2086bbbf50768b865639 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Thu, 8 Feb 2024 11:39:12 +0100 Subject: [PATCH] nixos/ccache: add test --- nixos/tests/ccache.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 nixos/tests/ccache.nix diff --git a/nixos/tests/ccache.nix b/nixos/tests/ccache.nix new file mode 100644 index 000000000000..a97ae0501767 --- /dev/null +++ b/nixos/tests/ccache.nix @@ -0,0 +1,24 @@ +import ./make-test-python.nix ({ pkgs, ...} : { + name = "ccache"; + meta = with pkgs.lib.maintainers; { + maintainers = [ ehmry ]; + }; + + 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() + ''; +})