scripts/completions/_cthon.zsh
Anna Schumaker 5e1664d88a cthon.zsh: Rewrite test
The runcthon script isn't the most straightforward for passing arbitrary
options or running with a specific NFS version. Deal with this by
writing our own version that does what we need it to do.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2022-05-16 16:53:21 -04:00

25 lines
1018 B
Bash

#compdef cthon.zsh
function _cthon.zsh() {
_arguments \
{-a,--all}'[run all tests]' \
{-b,--basic}'[run basic tests]' \
{-c,--client}'[the client to test]: : _alternative
"hosts\:hosts\: _ssh_hosts"
"domains\:domains\:($(virsh list --all --name))"' \
--dmesg'[print client dmesg log after running tests]' \
{-g,--general}'[run general tests]' \
{-l,--locking}'[run locking tests]' \
--nconnect'[number of connections]: :($(seq 1 32))' \
--krb5'[run tests with sec=krb5]' \
--srvdmesg'[print server dmesg log after running tests]' \
{-p,--mountpoint}'[the directory to mount the server]: : _files -/' \
{-r,--rdma}'[test using rdma]: :(rxe siw)' \
{-s,--server}'[the server to test against]: : _alternative
"hosts\:hosts\: _ssh_hosts"
"domains\:domains\:($(virsh list --all --name))"' \
{-S,--special}'[run special tests]' \
\*{-v,--version}+'[the nfs version to test (default=all)]: :(3 4 4.0 4.1 4.2)' \
{-x,--export}'[the exported directory on the server]: : _files -/'
}