Merge pull request #1070 from ZyX-I/fix-daemon

Include args.config_path in the key
This commit is contained in:
Nikolai Aleksandrovich Pavlov 2014-09-09 00:06:50 +04:00
commit 04a66ef8b2
3 changed files with 46 additions and 4 deletions

View File

@ -74,6 +74,7 @@ def render(args, environ, cwd):
args.renderer_module,
tuple(args.config) if args.config else None,
tuple(args.theme_option) if args.theme_option else None,
tuple(args.config_path) if args.config_path else None,
)
finish_args(args)
powerline = None

41
tests/run_daemon_tests.sh Executable file
View File

@ -0,0 +1,41 @@
#!/bin/sh
FAILED=0
export ADDRESS="powerline-ipc-test-$$"
echo "Powerline address: $ADDRESS"
if $PYTHON scripts/powerline-daemon -s$ADDRESS ; then
sleep 1
if ! ( \
$PYTHON client/powerline.py --socket $ADDRESS -p/dev/null shell left | \
grep 'file not found'
) ; then
echo "-p/dev/null argument ignored or not treated properly"
FAILED=1
fi
if ( \
$PYTHON client/powerline.py --socket $ADDRESS \
-p$PWD/powerline/config_files shell left | \
grep 'file not found'
) ; then
echo "-p/dev/null argument remembered while it should not"
FAILED=1
fi
if ! ( \
cd tests && \
$PYTHON ../client/powerline.py --socket $ADDRESS \
-p$PWD/../powerline/config_files shell left | \
grep 'tests'
) ; then
echo "Output lacks string “tests”"
FAILED=1
fi
else
echo "Daemon exited with status $?"
FAILED=1
fi
if $PYTHON scripts/powerline-daemon -s$ADDRESS -k ; then
:
else
echo "powerline-daemon -k failed with exit code $?"
FAILED=1
fi
exit $FAILED

View File

@ -332,12 +332,12 @@ if test -z "${ONLY_SHELL}" || test "x${ONLY_SHELL%sh}" != "x${ONLY_SHELL}" || te
done
fi
if ! $PYTHON scripts/powerline-daemon -s$ADDRESS > tests/shell/daemon_log_2 2>&1 ; then
echo "Daemon exited with status $?"
FAILED=1
else
if $PYTHON scripts/powerline-daemon -s$ADDRESS > tests/shell/daemon_log_2 2>&1 ; then
sleep 1
$PYTHON scripts/powerline-daemon -s$ADDRESS -k
else
echo "Daemon exited with status $?"
FAILED=1
fi
if ! test -z "$(cat tests/shell/daemon_log_2)" ; then