test: preserve root TMPDIR prefix
This commit is contained in:
@@ -134,6 +134,21 @@ sed '/^case "\$mode" in/,$d' "$root/scripts/verify-workspace-install-docs.sh" >"
|
||||
# shellcheck source=/dev/null
|
||||
source "$verifier_functions"
|
||||
|
||||
prefix_tmpdir="$(TMPDIR=/tmp bash -c 'source "$1"; printf "%s" "$tmp_prefix"' _ "$verifier_functions")"
|
||||
prefix_root="$(TMPDIR=/ bash -c 'source "$1"; printf "%s" "$tmp_prefix"' _ "$verifier_functions")"
|
||||
[[ "$prefix_tmpdir" == "/tmp/" ]] || {
|
||||
echo "normalized /tmp prefix must be slash-terminated: $prefix_tmpdir" >&2
|
||||
exit 1
|
||||
}
|
||||
[[ "$prefix_root" == "/" ]] || {
|
||||
echo "normalized root prefix must remain /: $prefix_root" >&2
|
||||
exit 1
|
||||
}
|
||||
[[ "${prefix_root}thoth-probe.XXXXXX" == "/thoth-probe.XXXXXX" ]] || {
|
||||
echo "root prefix concatenation produced an invalid path" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
PYTHONDONTWRITEBYTECODE=1 python3 "$root/scripts/test_workspace_descriptor_doc_contract.py"
|
||||
|
||||
project_topology_fixture="$negative_root/project-topology-contradiction.md"
|
||||
|
||||
Reference in New Issue
Block a user