Merge pull request #13823 from mehrdada/shellcheckify-runtests-slash-sanity

shellcheckify `tools/run_tests/sanity`
pull/13831/head
Mehrdad Afshari 7 years ago committed by GitHub
commit 0dd982cf4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      tools/run_tests/sanity/check_clang_tidy.sh
  2. 10
      tools/run_tests/sanity/check_owners.sh
  3. 1
      tools/run_tests/sanity/check_shellcheck.sh
  4. 14
      tools/run_tests/sanity/check_submodules.sh
  5. 8
      tools/run_tests/sanity/check_unsecure.sh
  6. 2
      tools/run_tests/sanity/core_untyped_structs.sh

@ -16,6 +16,6 @@
set -e set -e
make buildtests \ make buildtests \
-j `python -c 'import multiprocessing; print multiprocessing.cpu_count()'` -j "$(python -c 'import multiprocessing; print multiprocessing.cpu_count()')"
find src/core src/cpp test/core test/cpp -name '*.h' -or -name '*.cc' | \ find src/core src/cpp test/core test/cpp -print0 -name '*.h' -or -name '*.cc' \
xargs tools/distrib/run_clang_tidy.py $* | xargs -0 tools/distrib/run_clang_tidy.py "$@"

@ -18,12 +18,12 @@ set -e
export TEST=true export TEST=true
cd `dirname $0`/../../.. cd "$(dirname "$0")/../../.."
owners=.github/CODEOWNERS owners=.github/CODEOWNERS
want_owners=`mktemp /tmp/submXXXXXX` want_owners=$(mktemp /tmp/submXXXXXX)
tools/mkowners/mkowners.py -o $want_owners tools/mkowners/mkowners.py -o "$want_owners"
diff -u $owners $want_owners diff -u "$owners" "$want_owners"
rm $want_owners rm "$want_owners"

@ -20,6 +20,7 @@ ROOT="$(dirname "$0")/../../.."
DIRS=( DIRS=(
'tools/run_tests/helper_scripts' 'tools/run_tests/helper_scripts'
'tools/run_tests/sanity'
) )
for dir in "${DIRS[@]}"; do for dir in "${DIRS[@]}"; do

@ -19,13 +19,13 @@ set -e
export TEST=true export TEST=true
cd `dirname $0`/../../.. cd "$(dirname "$0")/../../.."
submodules=`mktemp /tmp/submXXXXXX` submodules=$(mktemp /tmp/submXXXXXX)
want_submodules=`mktemp /tmp/submXXXXXX` want_submodules=$(mktemp /tmp/submXXXXXX)
git submodule | awk '{ print $1 }' | sort > $submodules git submodule | awk '{ print $1 }' | sort > "$submodules"
cat << EOF | awk '{ print $1 }' | sort > $want_submodules cat << EOF | awk '{ print $1 }' | sort > "$want_submodules"
5b7683f49e1e9223cf9927b24f6fd3d6bd82e3f8 third_party/benchmark (v1.2.0) 5b7683f49e1e9223cf9927b24f6fd3d6bd82e3f8 third_party/benchmark (v1.2.0)
be2ee342d3781ddb954f91f8a7e660c6f59e87e5 third_party/boringssl (heads/chromium-stable) be2ee342d3781ddb954f91f8a7e660c6f59e87e5 third_party/boringssl (heads/chromium-stable)
886e7d75368e3f4fab3f4d0d3584e4abfc557755 third_party/boringssl-with-bazel (version_for_cocoapods_7.0-857-g886e7d7) 886e7d75368e3f4fab3f4d0d3584e4abfc557755 third_party/boringssl-with-bazel (version_for_cocoapods_7.0-857-g886e7d7)
@ -38,6 +38,6 @@ cat << EOF | awk '{ print $1 }' | sort > $want_submodules
cc4bed2d74f7c8717e31f9579214ab52a9c9c610 third_party/abseil-cpp cc4bed2d74f7c8717e31f9579214ab52a9c9c610 third_party/abseil-cpp
EOF EOF
diff -u $submodules $want_submodules diff -u "$submodules" "$want_submodules"
rm $submodules $want_submodules rm "$submodules" "$want_submodules"

@ -18,10 +18,10 @@ set -e
# Make sure that there is no path from known unsecure libraries and targets # Make sure that there is no path from known unsecure libraries and targets
# to an SSL library. Any failure among these will make the script fail. # to an SSL library. Any failure among these will make the script fail.
test `bazel query 'somepath("//:grpc_unsecure", "//external:libssl")' 2>/dev/null | wc -l` -eq 0 || exit 1 test "$(bazel query 'somepath("//:grpc_unsecure", "//external:libssl")' 2>/dev/null | wc -l)" -eq 0 || exit 1
test `bazel query 'somepath("//:grpc++_unsecure", "//external:libssl")' 2>/dev/null | wc -l` -eq 0 || exit 1 test "$(bazel query 'somepath("//:grpc++_unsecure", "//external:libssl")' 2>/dev/null | wc -l)" -eq 0 || exit 1
test `bazel query 'somepath("//:grpc++_codegen_proto", "//external:libssl")' 2>/dev/null | wc -l` -eq 0 || exit 1 test "$(bazel query 'somepath("//:grpc++_codegen_proto", "//external:libssl")' 2>/dev/null | wc -l)" -eq 0 || exit 1
test `bazel query 'somepath("//test/cpp/microbenchmarks:helpers", "//external:libssl")' 2>/dev/null | wc -l` -eq 0 || exit 1 test "$(bazel query 'somepath("//test/cpp/microbenchmarks:helpers", "//external:libssl")' 2>/dev/null | wc -l)" -eq 0 || exit 1
exit 0 exit 0

@ -15,7 +15,7 @@
set -e set -e
cd `dirname $0`/../../.. cd "$(dirname "$0")/../../.."
# #
# Make sure that all core struct/unions have a name or are typedef'ed # Make sure that all core struct/unions have a name or are typedef'ed

Loading…
Cancel
Save