]> git.proxmox.com Git - mirror_qemu.git/commit
tests/unit: make test-io-channel-command work on win32
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 6 Oct 2022 11:36:57 +0000 (15:36 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 12 Oct 2022 15:22:01 +0000 (19:22 +0400)
commit76f5148c21b4543e62a6ad605ac4b44133421401
treebbcbf5858912928e1ca83dca697dc424b9ef6f78
parentec5b6c9c5de985769a3d816b85cfe707a2decb93
tests/unit: make test-io-channel-command work on win32

This has been tested under msys2 & windows 11. I haven't tried to make
it work with other environments yet, but that should be enough to
validate the channel-command implementation anyway.

Here are the changes:
- drop tests/ from fifo/pipe path, to avoid directory issues
- use g_find_program() to lookup the socat executable (otherwise we
would need to change ChanneCommand to use G_SPAWN_SEARCH_PATH, and deal
with missing socat differently)
- skip the "echo" test when socat is missing as well

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20221006113657.2656108-7-marcandre.lureau@redhat.com>
tests/unit/test-io-channel-command.c