From 1c57fe8ee2082108af0ffd07daa1e91767b9a5e1 Mon Sep 17 00:00:00 2001 From: Daniel Nichter Date: Tue, 14 Feb 2012 11:02:28 -0700 Subject: [PATCH] Conditionalize lsof test in collect.sh. --- t/lib/bash/collect.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/t/lib/bash/collect.sh b/t/lib/bash/collect.sh index 624e6dd9..a40a1dfb 100644 --- a/t/lib/bash/collect.sh +++ b/t/lib/bash/collect.sh @@ -73,9 +73,13 @@ else is "1" "1" "SKIP Can't determine MySQL 5.0 error log" fi -cmd_ok \ - "grep -q 'COMMAND[ ]\+PID[ ]\+USER' $p-lsof" \ - "lsof" +if [ "$(which lsof 2>/dev/null)" ]; then + cmd_ok \ + "grep -q 'COMMAND[ ]\+PID[ ]\+USER' $p-lsof" \ + "lsof" +else + is "1" "1" "SKIP lsof not in PATH" +fi cmd_ok \ "grep -q 'buf0buf.c' $p-mutex-status1" \