Fix the build script (#30985)

* Fix the build script

* Set -ex

* fix unsigned int comparisons and ignored return values

Co-authored-by: AJ Heller <hork@google.com>
pull/30990/head
Esun Kim 3 years ago committed by GitHub
parent 0f2a0f5fc9
commit 888c64adf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      test/core/event_engine/test_suite/oracle_event_engine_posix.cc
  2. 2
      test/core/iomgr/tcp_posix_test.cc
  3. 6
      test/core/memory_usage/callback_server.cc
  4. 7
      tools/internal_ci/linux/grpc_bazel_build_in_docker.sh

@ -321,7 +321,7 @@ PosixOracleListener::~PosixOracleListener() {
shutdown(listener_fds_[i], SHUT_RDWR); shutdown(listener_fds_[i], SHUT_RDWR);
} }
// Send a STOP message over the pipe. // Send a STOP message over the pipe.
write(pipefd_[1], kStopMessage, strlen(kStopMessage)); GPR_ASSERT(write(pipefd_[1], kStopMessage, strlen(kStopMessage)) != -1);
serve_.Join(); serve_.Join();
on_shutdown_(absl::OkStatus()); on_shutdown_(absl::OkStatus());
} }

@ -155,7 +155,7 @@ static size_t fill_socket_partial(int fd, size_t bytes) {
struct read_socket_state { struct read_socket_state {
grpc_endpoint* ep; grpc_endpoint* ep;
int min_progress_size; size_t min_progress_size;
size_t read_bytes; size_t read_bytes;
size_t target_read_bytes; size_t target_read_bytes;
grpc_slice_buffer incoming; grpc_slice_buffer incoming;

@ -45,15 +45,15 @@ class ServerCallbackImpl final
grpc::ServerUnaryReactor* UnaryCall( grpc::ServerUnaryReactor* UnaryCall(
grpc::CallbackServerContext* context, grpc::CallbackServerContext* context,
const grpc::testing::SimpleRequest* request, const grpc::testing::SimpleRequest* /* request */,
grpc::testing::SimpleResponse* response) override { grpc::testing::SimpleResponse* /* response */) override {
auto* reactor = context->DefaultReactor(); auto* reactor = context->DefaultReactor();
reactor->Finish(grpc::Status::OK); reactor->Finish(grpc::Status::OK);
return reactor; return reactor;
} }
grpc::ServerUnaryReactor* GetBeforeSnapshot( grpc::ServerUnaryReactor* GetBeforeSnapshot(
grpc::CallbackServerContext* context, grpc::CallbackServerContext* context,
const grpc::testing::SimpleRequest* request, const grpc::testing::SimpleRequest* /* request */,
grpc::testing::MemorySize* response) override { grpc::testing::MemorySize* response) override {
gpr_log(GPR_INFO, "BeforeSnapshot RPC CALL RECEIVED"); gpr_log(GPR_INFO, "BeforeSnapshot RPC CALL RECEIVED");
response->set_rss(before_server_create); response->set_rss(before_server_create);

@ -17,6 +17,9 @@
# clang compiler to check if sources can pass a set of warning options. # clang compiler to check if sources can pass a set of warning options.
# For now //examples/android/binder/ are excluded because it needs Android # For now //examples/android/binder/ are excluded because it needs Android
# SDK/NDK to be installed to build # SDK/NDK to be installed to build
set -ex
python3 tools/run_tests/python_utils/bazel_report_helper.py --report_path bazel_build_with_strict_warnings python3 tools/run_tests/python_utils/bazel_report_helper.py --report_path bazel_build_with_strict_warnings
bazel_build_with_strict_warnings/bazel_wrapper \ bazel_build_with_strict_warnings/bazel_wrapper \
--bazelrc=tools/remote_build/include/test_locally_with_resultstore_results.bazelrc \ --bazelrc=tools/remote_build/include/test_locally_with_resultstore_results.bazelrc \
@ -36,11 +39,11 @@ bazel_build_with_strict_warnings/bazel_wrapper \
# details. # details.
# Test that builds with --define=grpc_no_xds=true work. # Test that builds with --define=grpc_no_xds=true work.
bazel build //test/cpp/end2end:end2end_test --define=grpc_no_xds=true bazel build //test/cpp/end2end:end2end_test --define=grpc_no_xds=true
# Test that builds that need xDS do not build with --define=grpc_no_xds=true # Test that builds that need xDS do not build with --define=grpc_no_xds=true
EXIT_CODE=0 EXIT_CODE=0
bazel build //test/cpp/end2end/xds:xds_end2end_test --define=grpc_no_xds=true || EXIT_CODE=$? bazel build //test/cpp/end2end/xds:xds_end2end_test --define=grpc_no_xds=true || EXIT_CODE=$?
if [ $EXIT_CODE -eq 0 ] if [ $EXIT_CODE -eq 0 ]; then
then
echo "Building xds_end2end_test succeeded even with --define=grpc_no_xds=true" echo "Building xds_end2end_test succeeded even with --define=grpc_no_xds=true"
exit 1 exit 1
fi fi

Loading…
Cancel
Save