]> git.ipfire.org Git - thirdparty/zstd.git/commit
[cli-tests] Fix zstd symlinks 3055/head
authorNick Terrell <terrelln@fb.com>
Mon, 7 Feb 2022 23:20:42 +0000 (15:20 -0800)
committerNick Terrell <terrelln@fb.com>
Mon, 7 Feb 2022 23:20:42 +0000 (15:20 -0800)
commit169f8c11fff94c7cb2280efb1b5ae3c8fb3a7c5c
tree05b15857b3a9afed8c5152f8834c720085b83961
parentb848c167abbb4c26a1f06a2b0187d9a70d7bc493
[cli-tests] Fix zstd symlinks

The zstd symlinks, notably `zstdcat`, weren't working as expected
because only the `tests/cli-tests/bin/zstd` wrapper was symlinked. We
still invoked `zstd` with the name `zstd`. The fix is to create a
directory of zstd symlinks in `tests/cli-tests/bin/symlinks` for each
name that zstd recognizes. And when `tets/cli-tests/bin/zstd` is
invoked, it selects the correct symlink to call.

See the test `zstd-cli/zstdcat.sh` for an example of how it would work.
tests/cli-tests/.gitignore
tests/cli-tests/bin/zstd
tests/cli-tests/run.py
tests/cli-tests/zstd-symlinks/setup [new file with mode: 0755]
tests/cli-tests/zstd-symlinks/zstdcat.sh [new file with mode: 0755]
tests/cli-tests/zstd-symlinks/zstdcat.sh.stdout.exact [new file with mode: 0644]