Make COMMAND_PATTERN consistent with other arguments

This commit is contained in:
ZyX 2014-08-24 16:59:03 +04:00
parent 68ecd81edd
commit 54672aace0
2 changed files with 6 additions and 7 deletions

View File

@ -25,3 +25,4 @@ cd ../'$(echo)'
cd ../'`echo`'
false
true is the last line
exit

View File

@ -7,9 +7,9 @@ if test "x$1" = "x--fast" ; then
fi
ONLY_SHELL="$1"
ONLY_TEST_TYPE="$2"
COMMAND_PATTERN="$3"
ONLY_TEST_CLIENT="$3"
if ! test -z "$ONLY_SHELL$ONLY_TEST_TYPE$COMMAND_PATTERN" ; then
if ! test -z "$ONLY_SHELL$ONLY_TEST_TYPE$ONLY_TEST_CLIENT" ; then
FAST=
fi
@ -18,11 +18,11 @@ export PYTHON
if test "x$ONLY_SHELL" = "x--help" ; then
cat << EOF
Usage:
$0 [[[ONLY_SHELL | ""] (ONLY_TEST_TYPE | "")] (COMMAND_PATTERN | "")]
$0 [[[ONLY_SHELL | ""] (ONLY_TEST_TYPE | "")] (ONLY_TEST_CLIENT | "")]
ONLY_SHELL: execute only tests for given shell
ONLY_TEST_TYPE: execute only "daemon" or "nodaemon" tests
COMMAND_PATTERN: use only commands that match given pattern for testing
ONLY_TEST_CLIENT: use only given test client (one of C, python, render, shell)
EOF
exit 0
fi
@ -276,9 +276,7 @@ if test -z "${ONLY_SHELL}" || test "x${ONLY_SHELL%sh}" != "x${ONLY_SHELL}" || te
if test "$TEST_CLIENT" = "shell" && ! which socat >/dev/null ; then
continue
fi
if test "x$COMMAND_PATTERN" != "x" && ! (
echo "$POWERLINE_COMMAND" | grep -e"$COMMAND_PATTERN" &>/dev/null)
then
if test "x$ONLY_TEST_CLIENT" != "x" && test "x$TEST_CLIENT" != "x$ONLY_TEST_CLIENT" ; then
continue
fi
POWERLINE_COMMAND="$POWERLINE_COMMAND --socket $ADDRESS"