aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobert Helgesson <robert@rycee.net>2020-09-04 16:02:05 +0200
committerRobert Helgesson <robert@rycee.net>2020-09-04 16:02:17 +0200
commita063b73d5cf2d741f5f873897974d1a4c3e36d3d (patch)
tree535b273147ad5a6832b9b41c5400e5e60cd9706e /tests
parentbfc66df13dc941361f5af92eaf88f2ea5db39722 (diff)
parentd3aee544b686a72b2bb7eeb379f72c6b6b2665b7 (diff)
Merge PR #1460
Diffstat (limited to 'tests')
-rw-r--r--tests/default.nix4
-rw-r--r--tests/modules/targets-darwin/darwin.nix20
-rw-r--r--tests/modules/targets-darwin/default.nix1
-rw-r--r--tests/modules/targets-linux/default.nix (renamed from tests/modules/targets/default.nix)0
-rw-r--r--tests/modules/targets-linux/generic-linux.nix (renamed from tests/modules/targets/generic-linux.nix)0
5 files changed, 24 insertions, 1 deletions
diff --git a/tests/default.nix b/tests/default.nix
index 02afd5a2518..b44e4185fcc 100644
--- a/tests/default.nix
+++ b/tests/default.nix
@@ -69,6 +69,8 @@ import nmt {
./modules/programs/zplug
./modules/programs/zsh
./modules/xresources
+ ] ++ lib.optionals pkgs.stdenv.hostPlatform.isDarwin [
+ ./modules/targets-darwin
] ++ lib.optionals pkgs.stdenv.hostPlatform.isLinux [
./meta # Suffices to run on one platform.
./modules/misc/debug
@@ -93,6 +95,6 @@ import nmt {
./modules/services/window-managers/i3
./modules/services/window-managers/sway
./modules/systemd
- ./modules/targets
+ ./modules/targets-linux
]);
}
diff --git a/tests/modules/targets-darwin/darwin.nix b/tests/modules/targets-darwin/darwin.nix
new file mode 100644
index 00000000000..511ae87fd98
--- /dev/null
+++ b/tests/modules/targets-darwin/darwin.nix
@@ -0,0 +1,20 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+ darwinTestApp = pkgs.runCommandLocal "target-darwin-example-app" { } ''
+ mkdir -p $out/Applications
+ touch $out/Applications/example-app
+ '';
+
+in {
+ config = {
+ home.packages = [ darwinTestApp ];
+
+ nmt.script = ''
+ assertFileExists 'home-files/Applications/Home Manager Apps/example-app'
+ '';
+ };
+}
diff --git a/tests/modules/targets-darwin/default.nix b/tests/modules/targets-darwin/default.nix
new file mode 100644
index 00000000000..479f586eef3
--- /dev/null
+++ b/tests/modules/targets-darwin/default.nix
@@ -0,0 +1 @@
+{ targets-darwin = ./darwin.nix; }
diff --git a/tests/modules/targets/default.nix b/tests/modules/targets-linux/default.nix
index e13617ccb74..e13617ccb74 100644
--- a/tests/modules/targets/default.nix
+++ b/tests/modules/targets-linux/default.nix
diff --git a/tests/modules/targets/generic-linux.nix b/tests/modules/targets-linux/generic-linux.nix
index d9bb85b651a..d9bb85b651a 100644
--- a/tests/modules/targets/generic-linux.nix
+++ b/tests/modules/targets-linux/generic-linux.nix