diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2020-05-11 16:32:24 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2020-05-14 17:21:27 +0200 |
| commit | fde2aec3f498d5ec6db2121d72068e2b203e86cd (patch) | |
| tree | d0d3c9b723c3e694ca107cff9315075e8267ebf4 /tests/guix-pack-relocatable.sh | |
| parent | 80963744a242257921917df5a901dc343d3a93db (diff) | |
pack: Wrapper honors 'GUIX_EXECUTION_ENGINE' environment variable.
* gnu/packages/aux-files/run-in-namespace.c (struct engine): New type.
(exec_default): New function.
(engines): New variable.
(execution_engine): New function.
(main): Use it instead of calling 'exec_in_user_namespace' and
'exec_with_proot' directly.
* tests/guix-pack-relocatable.sh: Add test with 'GUIX_EXECUTION_ENGINE'.
* doc/guix.texi (Invoking guix pack): Document 'GUIX_EXECUTION_ENGINE'.
Diffstat (limited to 'tests/guix-pack-relocatable.sh')
| -rw-r--r-- | tests/guix-pack-relocatable.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/guix-pack-relocatable.sh b/tests/guix-pack-relocatable.sh index a3fd45623c2..cb56815fed7 100644 --- a/tests/guix-pack-relocatable.sh +++ b/tests/guix-pack-relocatable.sh | |||
| @@ -84,6 +84,23 @@ fi | |||
| 84 | grep 'GNU sed' "$test_directory/output" | 84 | grep 'GNU sed' "$test_directory/output" |
| 85 | chmod -Rf +w "$test_directory"; rm -rf "$test_directory"/* | 85 | chmod -Rf +w "$test_directory"; rm -rf "$test_directory"/* |
| 86 | 86 | ||
| 87 | case "`uname -m`" in | ||
| 88 | x86_64|i?86) | ||
| 89 | # Try '-RR' and PRoot. | ||
| 90 | tarball="`guix pack -RR -S /Bin=bin sed`" | ||
| 91 | tar tvf "$tarball" | grep /bin/proot | ||
| 92 | (cd "$test_directory"; tar xvf "$tarball") | ||
| 93 | GUIX_EXECUTION_ENGINE="proot" | ||
| 94 | export GUIX_EXECUTION_ENGINE | ||
| 95 | "$test_directory/Bin/sed" --version > "$test_directory/output" | ||
| 96 | grep 'GNU sed' "$test_directory/output" | ||
| 97 | chmod -Rf +w "$test_directory"; rm -rf "$test_directory"/* | ||
| 98 | ;; | ||
| 99 | *) | ||
| 100 | echo "skipping PRoot test" >&2 | ||
| 101 | ;; | ||
| 102 | esac | ||
| 103 | |||
| 87 | # Ensure '-R' works with outputs other than "out". | 104 | # Ensure '-R' works with outputs other than "out". |
| 88 | tarball="`guix pack -R -S /share=share groff:doc`" | 105 | tarball="`guix pack -R -S /share=share groff:doc`" |
| 89 | (cd "$test_directory"; tar xvf "$tarball") | 106 | (cd "$test_directory"; tar xvf "$tarball") |
