Blame tests/functional/log_test_client.sh
|
Packit Service |
f88c7f |
#!/bin/sh
|
|
Packit Service |
f88c7f |
# Copyright 2017 Red Hat, Inc.
|
|
Packit Service |
f88c7f |
#
|
|
Packit Service |
f88c7f |
# Author: Jan Pokorny <jpokorny@redhat.com>
|
|
Packit Service |
f88c7f |
#
|
|
Packit Service |
f88c7f |
# This file is part of libqb.
|
|
Packit Service |
f88c7f |
#
|
|
Packit Service |
f88c7f |
# libqb is free software: you can redistribute it and/or modify
|
|
Packit Service |
f88c7f |
# it under the terms of the GNU Lesser General Public License as published by
|
|
Packit Service |
f88c7f |
# the Free Software Foundation, either version 2.1 of the License, or
|
|
Packit Service |
f88c7f |
# (at your option) any later version.
|
|
Packit Service |
f88c7f |
#
|
|
Packit Service |
f88c7f |
# libqb is distributed in the hope that it will be useful,
|
|
Packit Service |
f88c7f |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
f88c7f |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit Service |
f88c7f |
# GNU Lesser General Public License for more details.
|
|
Packit Service |
f88c7f |
#
|
|
Packit Service |
f88c7f |
# You should have received a copy of the GNU Lesser General Public License
|
|
Packit Service |
f88c7f |
# along with libqb. If not, see <http://www.gnu.org/licenses/>.
|
|
Packit Service |
f88c7f |
|
|
Packit Service |
f88c7f |
# error msg can differ per locale, errno code per system (Hurd begs to differ)
|
|
Packit Service |
f88c7f |
./log_client 2>&1 >/dev/null \
|
|
Packit Service |
f88c7f |
| sed 's/\(qb_log_blackbox_print_from_file:\).*/\1/' \
|
|
Packit Service |
f88c7f |
>log_test_client.err.real
|
|
Packit Service |
f88c7f |
|
|
Packit Service |
f88c7f |
_pipeline='cat ../log_test_client.err'
|
|
Packit Service |
f88c7f |
case "${CPPFLAGS}" in
|
|
Packit Service |
f88c7f |
*-DNLOG*)
|
|
Packit Service |
f88c7f |
_pipeline="${_pipeline} | \
|
|
Packit Service |
f88c7f |
grep -Ev '^\[MAIN |info] \.\./log_client\.c'";;
|
|
Packit Service |
f88c7f |
esac
|
|
Packit Service |
f88c7f |
|
|
Packit Service |
f88c7f |
eval "${_pipeline}" | diff -u - log_test_client.err.real
|