@@ -814,13 +814,32 @@ elif [[ "$1" == "bazel.legacy.test" ]]; then
814814 bazel $BAZEL_STARTUP_OPTIONS test $BAZEL_TEST_OPTIONS_ASYNC -- //... -//exporters/otlp/... -//exporters/prometheus/...
815815 exit 0
816816elif [[ " $1 " == " bazel.noexcept" ]]; then
817- # there are some exceptions and error handling code from the Prometheus Client
818- # as well as Opentracing shim (due to some third party code in its Opentracing dependency)
819- # that make this test always fail. Ignore these packages in the noexcept test here.
820- # Set the api:with_cxx_stdlib=none because C++17 std::variant::get<> throws
817+ # The following directories and targets use exceptions and are excluded.
818+ # TODO: create an exception handling policy that defines which components allow excecptions.
819+
820+ NOEXCEPT_EXCLUDES=(
821+ -//exporters/prometheus/...
822+ -//examples/prometheus/...
823+ -//opentracing-shim/...
824+ -//examples/configuration/...
825+ -//sdk/src/configuration/...
826+ -//sdk/test/configuration/...
827+ -//resource_detectors/...
828+ -//exporters/otlp:otlp_builder_utils
829+ -//exporters/otlp:otlp_grpc_span_exporter_builder
830+ -//exporters/otlp:otlp_grpc_log_record_exporter_builder
831+ -//exporters/otlp:otlp_grpc_metric_exporter_builder
832+ -//exporters/otlp:otlp_http_span_exporter_builder
833+ -//exporters/otlp:otlp_http_log_record_exporter_builder
834+ -//exporters/otlp:otlp_http_metric_exporter_builder
835+ -//exporters/otlp:otlp_file_span_exporter_builder
836+ -//exporters/otlp:otlp_file_log_record_exporter_builder
837+ -//exporters/otlp:otlp_file_metric_exporter_builder
838+ )
821839
822- bazel $BAZEL_STARTUP_OPTIONS build --copt=-fno-exceptions --//api:with_cxx_stdlib=none $BAZEL_OPTIONS_ASYNC -- //... -//exporters/prometheus/... -//examples/prometheus/... -//opentracing-shim/... -//examples/configuration/... -//sdk/src/configuration/... -//sdk/test/configuration/... -//resource_detectors/...
823- bazel $BAZEL_STARTUP_OPTIONS test --copt=-fno-exceptions --//api:with_cxx_stdlib=none $BAZEL_TEST_OPTIONS_ASYNC -- //... -//exporters/prometheus/... -//examples/prometheus/... -//opentracing-shim/... -//examples/configuration/... -//sdk/src/configuration/... -//sdk/test/configuration/... -//resource_detectors/...
840+ # Set the api:with_cxx_stdlib=none because C++17 std::variant::get<> throws
841+ bazel $BAZEL_STARTUP_OPTIONS build --copt=-fno-exceptions --//api:with_cxx_stdlib=none $BAZEL_OPTIONS_ASYNC -- //... " ${NOEXCEPT_EXCLUDES[@]} "
842+ bazel $BAZEL_STARTUP_OPTIONS test --copt=-fno-exceptions --//api:with_cxx_stdlib=none $BAZEL_TEST_OPTIONS_ASYNC -- //... " ${NOEXCEPT_EXCLUDES[@]} "
824843 exit 0
825844elif [[ " $1 " == " bazel.nortti" ]]; then
826845 # there are some exceptions and error handling code from the Prometheus Client
0 commit comments