diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2017-05-15 20:35:30 +0200 |
|---|---|---|
| committer | Daiderd Jordan <daiderd@gmail.com> | 2017-05-15 20:35:30 +0200 |
| commit | 2ed3ca511ff0c5d18ebf09047a34a700236110c7 (patch) | |
| tree | 189591c43b6dedd98da3f8e1d6adddcee191c551 | |
| parent | 1b6f56f5b8042000a826ecba2ebe52a831e2df46 (diff) | |
add test for default environment.systemPath
| -rw-r--r-- | release.nix | 2 | ||||
| -rw-r--r-- | tests/environment-path.nix | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/release.nix b/release.nix index b0d5e79..dd8e0a7 100644 --- a/release.nix +++ b/release.nix @@ -88,6 +88,8 @@ let examples.lnl = genExample ./modules/examples/lnl.nix; examples.simple = genExample ./modules/examples/simple.nix; + tests.environment-path = makeTest ./tests/environment-path.nix; + tests.services-activate-system = makeTest ./tests/services-activate-system.nix; tests.system-defaults-write = makeTest ./tests/system-defaults-write.nix; diff --git a/tests/environment-path.nix b/tests/environment-path.nix new file mode 100644 index 0000000..d0f3d84 --- /dev/null +++ b/tests/environment-path.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + programs.bash.enable = true; + + test = '' + echo checking /run/current-system/sw/bin in systemPath >&2 + grep 'export PATH=.*:/run/current-system/sw/bin' ${config.out}/etc/bashrc + + echo checking /bin and /sbin in systemPath >&2 + grep 'export PATH=.*:/usr/bin:/usr/sbin:/bin:/sbin' ${config.out}/etc/bashrc + ''; +} |
