texlive.combine: move repstopdf test to tests.texlive (#231742)

This commit is contained in:
Vincenzo Mantova 2023-05-14 16:05:22 +01:00 committed by GitHub
parent 1feac2b617
commit d3b28b7fd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 9 deletions

View File

@ -199,4 +199,15 @@
{"$kpathsea","$schemeFull"/share/texmf-var}/web2c/fmtutil.cnf \
| tee "$out/fmtutil.cnf.patch"
'';
# verify that the restricted mode gets enabled when
# needed (detected by checking if it disallows --gscmd)
repstopdf = runCommand "texlive-test-repstopdf" {
nativeBuildInputs = [ (texlive.combine { inherit (texlive) scheme-infraonly epstopdf; }) ];
} ''
! (epstopdf --gscmd echo /dev/null 2>&1 || true) | grep forbidden >/dev/null
(repstopdf --gscmd echo /dev/null 2>&1 || true) | grep forbidden >/dev/null
mkdir "$out"
'';
}

View File

@ -289,15 +289,6 @@ in (buildEnv {
''
rm "$out"/bin/*-sys
wrapBin
'' +
# Perform a small test to verify that the restricted mode get enabled when
# needed (detected by checking if it disallows --gscmd)
''
if [[ -e "$out"/bin/epstopdf ]]; then
echo "Testing restricted mode for {,r}epstopdf"
! (epstopdf --gscmd echo /dev/null 2>&1 || true) | grep forbidden
(repstopdf --gscmd echo /dev/null 2>&1 || true) | grep forbidden
fi
'' +
# TODO: a context trigger https://www.preining.info/blog/2015/06/debian-tex-live-2015-the-new-layout/
# http://wiki.contextgarden.net/ConTeXt_Standalone#Unix-like_platforms_.28Linux.2FMacOS_X.2FFreeBSD.2FSolaris.29