From 11eb3222045ad48eb71efa927da033967e5d0703 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Tue, 19 Dec 2017 09:13:50 -0800 Subject: Fix check_clang_tidy.sh to pass shellcheck --- tools/run_tests/sanity/check_clang_tidy.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/run_tests/sanity/check_clang_tidy.sh b/tools/run_tests/sanity/check_clang_tidy.sh index 42ab511a20..6c4caa1ee6 100755 --- a/tools/run_tests/sanity/check_clang_tidy.sh +++ b/tools/run_tests/sanity/check_clang_tidy.sh @@ -16,6 +16,6 @@ set -e make buildtests \ - -j `python -c 'import multiprocessing; print multiprocessing.cpu_count()'` -find src/core src/cpp test/core test/cpp -name '*.h' -or -name '*.cc' | \ - xargs tools/distrib/run_clang_tidy.py $* + -j "$(python -c 'import multiprocessing; print multiprocessing.cpu_count()')" +find src/core src/cpp test/core test/cpp -print0 -name '*.h' -or -name '*.cc' \ + | xargs -0 tools/distrib/run_clang_tidy.py "$@" -- cgit v1.2.3 From 5f7ab9b519d6ccf9cd438ab3f1903a1d2a25ad07 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Tue, 19 Dec 2017 09:15:18 -0800 Subject: Fix check_owners.sh to pass shellcheck --- tools/run_tests/sanity/check_owners.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/run_tests/sanity/check_owners.sh b/tools/run_tests/sanity/check_owners.sh index b681fed1bb..de0e092578 100755 --- a/tools/run_tests/sanity/check_owners.sh +++ b/tools/run_tests/sanity/check_owners.sh @@ -18,12 +18,12 @@ set -e export TEST=true -cd `dirname $0`/../../.. +cd "$(dirname "$0")/../../.." owners=.github/CODEOWNERS -want_owners=`mktemp /tmp/submXXXXXX` +want_owners=$(mktemp /tmp/submXXXXXX) -tools/mkowners/mkowners.py -o $want_owners -diff -u $owners $want_owners +tools/mkowners/mkowners.py -o "$want_owners" +diff -u "$owners" "$want_owners" -rm $want_owners +rm "$want_owners" -- cgit v1.2.3 From fe3ca486bc3f65d32db91de4c06a7ba4d7e07df0 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Tue, 19 Dec 2017 09:16:26 -0800 Subject: Fix check_submodules.sh to pass shellcheck --- tools/run_tests/sanity/check_submodules.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh index b573d21f4f..ca604c6e52 100755 --- a/tools/run_tests/sanity/check_submodules.sh +++ b/tools/run_tests/sanity/check_submodules.sh @@ -19,13 +19,13 @@ set -e export TEST=true -cd `dirname $0`/../../.. +cd "$(dirname "$0")/../../.." -submodules=`mktemp /tmp/submXXXXXX` -want_submodules=`mktemp /tmp/submXXXXXX` +submodules=$(mktemp /tmp/submXXXXXX) +want_submodules=$(mktemp /tmp/submXXXXXX) -git submodule | awk '{ print $1 }' | sort > $submodules -cat << EOF | awk '{ print $1 }' | sort > $want_submodules +git submodule | awk '{ print $1 }' | sort > "$submodules" +cat << EOF | awk '{ print $1 }' | sort > "$want_submodules" 5b7683f49e1e9223cf9927b24f6fd3d6bd82e3f8 third_party/benchmark (v1.2.0) be2ee342d3781ddb954f91f8a7e660c6f59e87e5 third_party/boringssl (heads/chromium-stable) 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 EOF -diff -u $submodules $want_submodules +diff -u "$submodules" "$want_submodules" -rm $submodules $want_submodules +rm "$submodules" "$want_submodules" -- cgit v1.2.3 From 96ccd9ae979d30fbc5d5a7b43de79fba7ababa32 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Tue, 19 Dec 2017 09:17:48 -0800 Subject: Fix check_unsecure.sh to pass shellcheck --- tools/run_tests/sanity/check_unsecure.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/run_tests/sanity/check_unsecure.sh b/tools/run_tests/sanity/check_unsecure.sh index 8584cbe36b..cca1235479 100755 --- a/tools/run_tests/sanity/check_unsecure.sh +++ b/tools/run_tests/sanity/check_unsecure.sh @@ -18,10 +18,10 @@ set -e # 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. -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("//test/cpp/microbenchmarks:helpers", "//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("//test/cpp/microbenchmarks:helpers", "//external:libssl")' 2>/dev/null | wc -l)" -eq 0 || exit 1 exit 0 -- cgit v1.2.3 From d1563c37cd90b51064b3f871053eba97496e0917 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Tue, 19 Dec 2017 10:11:11 -0800 Subject: Fix core_untyped_structs.sh to pass shellcheck --- tools/run_tests/sanity/core_untyped_structs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/sanity/core_untyped_structs.sh b/tools/run_tests/sanity/core_untyped_structs.sh index 792dd68fdd..af319096fd 100755 --- a/tools/run_tests/sanity/core_untyped_structs.sh +++ b/tools/run_tests/sanity/core_untyped_structs.sh @@ -15,7 +15,7 @@ set -e -cd `dirname $0`/../../.. +cd "$(dirname "$0")/../../.." # # Make sure that all core struct/unions have a name or are typedef'ed -- cgit v1.2.3 From 5de0a1f44b4f20cf180bb3b6f7600e3cd962295d Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Tue, 19 Dec 2017 10:11:15 -0800 Subject: Enforce shellcheck on tools/run_tests/sanity --- tools/run_tests/sanity/check_shellcheck.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/run_tests/sanity/check_shellcheck.sh b/tools/run_tests/sanity/check_shellcheck.sh index f9b09167db..f2cba1892b 100755 --- a/tools/run_tests/sanity/check_shellcheck.sh +++ b/tools/run_tests/sanity/check_shellcheck.sh @@ -20,6 +20,7 @@ ROOT="$(dirname "$0")/../../.." DIRS=( 'tools/run_tests/helper_scripts' + 'tools/run_tests/sanity' ) for dir in "${DIRS[@]}"; do -- cgit v1.2.3