summary refs log tree commit diff
path: root/pkgs/test
diff options
context:
space:
mode:
authorNaïm Favier <n@monade.li>2023-03-29 14:06:45 +0200
committerNaïm Favier <n@monade.li>2023-03-29 14:06:45 +0200
commite6f19ea4295df7d4a05c1c122962309f5e6fca70 (patch)
treefc2c43cbb6c34116c7789725acd03958424c336d /pkgs/test
parent9973b3ec30e07dade936b1f0bfd084c5ec0596be (diff)
writeTextFile: chmod before checkPhase
Set the executable bit before running the check phase, so that the check
phase can run the script to test its behaviour.

This aligns with what `concatTextFile` is doing.

Also use explicit `if` statements so that we don't silently ignore
`chmod` failures.
Diffstat (limited to 'pkgs/test')
-rw-r--r--pkgs/test/default.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkgs/test/default.nix b/pkgs/test/default.nix
index 5d154d1630b63..bc810790a3dd5 100644
--- a/pkgs/test/default.nix
+++ b/pkgs/test/default.nix
@@ -70,6 +70,7 @@ with pkgs;
   trivial-builders = recurseIntoAttrs {
     writeStringReferencesToFile = callPackage ../build-support/trivial-builders/test/writeStringReferencesToFile.nix {};
     writeTextFile = callPackage ../build-support/trivial-builders/test/write-text-file.nix {};
+    writeShellScript = callPackage ../build-support/trivial-builders/test/write-shell-script.nix {};
     references = callPackage ../build-support/trivial-builders/test/references.nix {};
     overriding = callPackage ../build-support/trivial-builders/test-overriding.nix {};
     concat = callPackage ../build-support/trivial-builders/test/concat-test.nix {};