testing: ignore locale when invoking certain shell tools

When testing for specific output of shell tools, we need to ensure that the
system locale (typically engineering English) is active, otherwise we end
up with mismatches when the error messages get translated.
This commit is contained in:
Patrick Ohly 2014-04-23 05:35:09 -07:00
parent 15bb6dcc23
commit 32e3e92de7
2 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ killvalgrind () {
if ps --no-headers ww $pid; then
for signal in $signals; do
echo "valgrind.sh: killing forked process $pid with signal $signal"
kill -$signal $pid 2>&1 | grep -v 'No such process'
LC_ALL=C kill -$signal $pid 2>&1 | grep -v 'No such process'
done
fi
done

View File

@ -81,7 +81,7 @@ perl -e "sleep(60); kill(9, $BACKGROUND_PID);" &
KILL_PID=$!
set +e
wait $BACKGROUND_PID
msg=$(kill -KILL $KILL_PID 2>&1)
msg=$(LC_ALL=C kill -KILL $KILL_PID 2>&1)
SUBRET=$?
if echo "$msg" | grep -q 'No such process'; then
# Consider this a success.