about summary refs log tree commit diff
path: root/users/picnoir
diff options
context:
space:
mode:
Diffstat (limited to 'users/picnoir')
-rw-r--r--users/picnoir/tvix-daemon/vm-test/README.md5
-rw-r--r--users/picnoir/tvix-daemon/vm-test/default.nix28
2 files changed, 33 insertions, 0 deletions
diff --git a/users/picnoir/tvix-daemon/vm-test/README.md b/users/picnoir/tvix-daemon/vm-test/README.md
new file mode 100644
index 000000000000..bd7f14f7ef25
--- /dev/null
+++ b/users/picnoir/tvix-daemon/vm-test/README.md
@@ -0,0 +1,5 @@
+# Integration VM Test
+
+This VM test fails for now. We use it to conveniently test our implementation on a real world Nix setup.
+
+For now, it only adds a new path to the store. It'll likely do more in the future.
diff --git a/users/picnoir/tvix-daemon/vm-test/default.nix b/users/picnoir/tvix-daemon/vm-test/default.nix
new file mode 100644
index 000000000000..e70690ee02c5
--- /dev/null
+++ b/users/picnoir/tvix-daemon/vm-test/default.nix
@@ -0,0 +1,28 @@
+{ depot, pkgs, lib, ... }:
+
+let
+  nixosTestDrv = pkgs.nixosTest {
+    name = "tvix-daemon-vm-test";
+    nodes.machine = { config, pkgs, ... }: {
+      environment.systemPackages = [
+        (pkgs.writers.writeBashBin "poke-daemon" ''
+          NIX_REMOTE=unix:///nix/var/nix/daemon-socket/socket nix-instantiate -E '"''${/etc/nscd.conf}"'
+        '')
+      ];
+      systemd.services.nix-daemon.serviceConfig.ExecStart = [
+        ""
+        "${depot.users.picnoir.tvix-daemon.tvix-daemon}/bin/tvix-daemon"
+      ];
+
+    };
+    testScript = ''
+      machine.wait_for_unit("multi-user.target")
+      machine.succeed("poke-daemon")
+    '';
+  };
+in
+nixosTestDrv // {
+  # The test fails for now. TOREMOVE when we reach the stage where we
+  # can add stuff to the store.
+  meta.ci.skip = true;
+}