2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 10:58:58 +00:00

Fix tests with GNU grep 3.8

GNU grep 3.8 started to emit warnings when invoking egrep.
Convert all calls to grep -E.
This commit is contained in:
Andreas Stieger 2022-09-08 22:26:47 +02:00 committed by Jay Berkenbilt
parent 4dcc1021b8
commit 7049588bff
5 changed files with 6 additions and 6 deletions

View File

@ -3,7 +3,7 @@ set -eo pipefail
cd $(dirname $0)
whoami=$(basename $0)
if [[ $(git status -s | egrep -v abi-perf-test | wc -l) != 0 ]]; then
if [[ $(git status -s | grep -E -v abi-perf-test | wc -l) != 0 ]]; then
echo 1>&2 "${whoami}: git is not clean. (abi-perf-test changes ignored)"
git status -s
exit 2

View File

@ -10,7 +10,7 @@ pip3 install sphinx sphinx_rtd_theme
cmake -S . -B build -DBUILD_DOC=1
cmake --build build --target doc_dist
zip -r doc.zip build/manual/doc-dist
version=$(egrep '^release' manual/conf.py | cut -d"'" -f 2)
version=$(grep -E '^release' manual/conf.py | cut -d"'" -f 2)
mv build/manual/doc-dist qpdf-${version}-doc
mkdir distribution
zip -r distribution/qpdf-${version}-doc-ci.zip qpdf-${version}-doc

View File

@ -8,7 +8,7 @@ sudo apt-get -y install build-essential cmake zlib1g-dev libjpeg-dev
./fuzz/oss-fuzz-build
ls -l out/qpdf_fuzzer
ls -l out/
if ldd out/qpdf_fuzzer | egrep 'libjpeg|libz|libqpdf'; then
if ldd out/qpdf_fuzzer | grep -E 'libjpeg|libz|libqpdf'; then
echo 1>&2 "*** Fuzzers linked dynamically with some dependent libraries."
ldd out/qpdf_fuzzer
exit 2

View File

@ -1,5 +1,5 @@
#!/bin/sh
lines=$(expr 0 + $(diff "$1" "$2" | egrep '^[<>]' | egrep -v '(Date|InstanceID)' | wc -l))
lines=$(expr 0 + $(diff "$1" "$2" | grep -E '^[<>]' | grep -E -v '(Date|InstanceID)' | wc -l))
if [ "$lines" = "0" ]; then
echo okay
else

View File

@ -1,6 +1,6 @@
#!/bin/sh
lines=$(expr 0 + $(diff "$1" "$2" | egrep '^[<>]' | \
egrep -v '/ID' | egrep -v '%PDF-' | wc -l))
lines=$(expr 0 + $(diff "$1" "$2" | grep -E '^[<>]' | \
grep -E -v '/ID' | grep -E -v '%PDF-' | wc -l))
if [ "$lines" = "0" ]; then
echo okay
else