Fix C2196: egrep is non-standard and deprecated.

pull/22210/head
Esun Kim 5 years ago
parent 415d41f9e8
commit e019f18707
  1. 24
      test/core/iomgr/ios/CFStreamTests/build_and_run_tests.sh
  2. 4
      test/cpp/ios/build_and_run_tests.sh
  3. 4
      tools/run_tests/dockerize/build_and_run_docker.sh
  4. 4
      tools/run_tests/dockerize/build_docker_and_run_tests.sh
  5. 2
      tools/run_tests/dockerize/build_interop_image.sh
  6. 2
      tools/run_tests/sanity/check_bad_dependencies.sh
  7. 4
      tools/run_tests/sanity/core_untyped_structs.sh
  8. 10
      tools/run_tests/sanity/cpp_banned_constructs.sh

@ -34,9 +34,9 @@ xcodebuild \
-scheme CFStreamTests \
-destination name="iPhone 8" \
test \
| egrep -v "$XCODEBUILD_FILTER" \
| egrep -v '^$' \
| egrep -v "(GPBDictionary|GPBArray)" -
| grep -E -v "$XCODEBUILD_FILTER" \
| grep -E -v '^$' \
| grep -E -v "(GPBDictionary|GPBArray)" -
echo "TIME: $(date)"
@ -45,9 +45,9 @@ xcodebuild \
-scheme CFStreamTests_Asan \
-destination name="iPhone 8" \
test \
| egrep -v "$XCODEBUILD_FILTER" \
| egrep -v '^$' \
| egrep -v "(GPBDictionary|GPBArray)" -
| grep -E -v "$XCODEBUILD_FILTER" \
| grep -E -v '^$' \
| grep -E -v "(GPBDictionary|GPBArray)" -
echo "TIME: $(date)"
@ -56,9 +56,9 @@ xcodebuild \
-scheme CFStreamTests_Tsan \
-destination name="iPhone 8" \
test \
| egrep -v "$XCODEBUILD_FILTER" \
| egrep -v '^$' \
| egrep -v "(GPBDictionary|GPBArray)" -
| grep -E -v "$XCODEBUILD_FILTER" \
| grep -E -v '^$' \
| grep -E -v "(GPBDictionary|GPBArray)" -
echo "TIME: $(date)"
@ -67,6 +67,6 @@ xcodebuild \
-scheme CFStreamTests_Msan \
-destination name="iPhone 8" \
test \
| egrep -v "$XCODEBUILD_FILTER" \
| egrep -v '^$' \
| egrep -v "(GPBDictionary|GPBArray)" -
| grep -E -v "$XCODEBUILD_FILTER" \
| grep -E -v '^$' \
| grep -E -v "(GPBDictionary|GPBArray)" -

@ -36,5 +36,5 @@ xcodebuild \
-destination name="iPhone 8" \
test \
| ./verbose_time.sh \
| egrep -v "$XCODEBUILD_FILTER" \
| egrep -v '^$' -
| grep -E -v "$XCODEBUILD_FILTER" \
| grep -E -v '^$' -

@ -16,11 +16,13 @@
# Builds docker image and runs a command under it.
# You should never need to call this script on your own.
# shellcheck disable=SC2103
set -ex
cd "$(dirname "$0")/../../.."
git_root=$(pwd)
cd - # shellcheck disable=SC2103
cd -
# Inputs
# DOCKERFILE_DIR - Directory in which Dockerfile file is located.

@ -16,11 +16,13 @@
# This script is invoked by run_tests.py to accommodate "test under docker"
# scenario. You should never need to call this script on your own.
# shellcheck disable=SC2103
set -ex
cd "$(dirname "$0")/../../.."
git_root=$(pwd)
cd - # shellcheck disable=SC2103
cd -
# Inputs
# DOCKERFILE_DIR - Directory in which Dockerfile file is located.

@ -82,7 +82,7 @@ fi
# Use image name based on Dockerfile checksum
# on OSX use md5 instead of sha1sum
if which sha1sum > /dev/null;
if command -v sha1sum > /dev/null;
then
BASE_IMAGE=${BASE_NAME}_$(sha1sum "tools/dockerfile/interoptest/$BASE_NAME/Dockerfile" | cut -f1 -d\ )
else

@ -25,7 +25,7 @@ test "$(bazel query 'somepath("//test/cpp/microbenchmarks:helpers", "//external:
# Make sure that core doesn't depend on anything in C++ library
test "$(bazel query 'deps("//:grpc")' 2>/dev/null | egrep 'src/cpp|include/grpcpp' | wc -l)" -eq 0 || exit 1
test "$(bazel query 'deps("//:grpc")' 2>/dev/null | grep -Ec 'src/cpp|include/grpcpp')" -eq 0 || exit 1
exit 0

@ -21,7 +21,7 @@ cd "$(dirname "$0")/../../.."
# Make sure that all core struct/unions have a name or are typedef'ed
#
egrep -Irn '(struct|union) *{' include/grpc |
egrep -v typedef |
grep -EIrn '(struct|union) *{' include/grpc |
grep -Ev typedef |
diff - /dev/null

@ -23,27 +23,27 @@ cd "$(dirname "$0")/../../.."
# grpc_core::Thread, etc.
#
egrep -Irn \
grep -EIrn \
'std::(mutex|condition_variable|lock_guard|unique_lock|thread)' \
include/grpc include/grpcpp src/core src/cpp | \
egrep -v include/grpcpp/impl/codegen/sync.h | \
grep -Ev include/grpcpp/impl/codegen/sync.h | \
diff - /dev/null
#
# Prevent the include of disallowed C++ headers.
#
egrep -Irn \
grep -EIrn \
'^#include (<mutex>|<condition_variable>|<thread>|<ratio>|<filesystem>|<future>|<system_error>)' \
include/grpc include/grpcpp src/core src/cpp | \
egrep -v include/grpcpp/impl/codegen/sync.h | \
grep -Ev include/grpcpp/impl/codegen/sync.h | \
diff - /dev/null
#
# Prevent the include of headers that shouldn't be used in tests.
#
egrep -Irn \
grep -EIrn \
'^#include (<pthread.h>)' \
test | \
diff - /dev/null

Loading…
Cancel
Save