From 825aac5a7c91d47e7da559826bfc340ed568ac63 Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Wed, 8 Mar 2017 15:24:28 -0500 Subject: [PATCH] selftests/functional/test_basic.py: do not assume man is installed On some environments, such as when building RPM packages, very little can be assumed to be available. `man` is such as command that is *not* available, so let's check for it and skip tests accordingly. Signed-off-by: Cleber Rosa --- selftests/functional/test_basic.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/selftests/functional/test_basic.py b/selftests/functional/test_basic.py index fac0ac09..33e1e91e 100644 --- a/selftests/functional/test_basic.py +++ b/selftests/functional/test_basic.py @@ -114,9 +114,10 @@ CC_BINARY = probe_binary('cc') # but their behavior and flags are in most cases different. GNU_ECHO_BINARY = probe_binary('echo') if GNU_ECHO_BINARY is not None: - echo_manpage = process.run('man %s' % os.path.basename(GNU_ECHO_BINARY)).stdout - if '-e' not in echo_manpage: - GNU_ECHO_BINARY = probe_binary('gecho') + if probe_binary('man') is not None: + echo_manpage = process.run('man %s' % os.path.basename(GNU_ECHO_BINARY)).stdout + if '-e' not in echo_manpage: + GNU_ECHO_BINARY = probe_binary('gecho') READ_BINARY = probe_binary('read') SLEEP_BINARY = probe_binary('sleep') -- GitLab