diff --git a/.github/workflows/bazel-ci.yml b/.github/workflows/bazel-ci.yml index afbc158f..6e1371c0 100644 --- a/.github/workflows/bazel-ci.yml +++ b/.github/workflows/bazel-ci.yml @@ -51,4 +51,4 @@ jobs: - name: Scraping Test if: runner.os == 'macOS' - run: bazel test ${{ matrix.bazel_args }} --test_output=all //pull/tests/integration:scrape-test + run: bazel test ${{ matrix.bazel_args }} --test_output=all --test_env=TELEGRAF="$(brew --prefix telegraf)/bin/telegraf" //pull/tests/integration:scrape-test diff --git a/MODULE.bazel b/MODULE.bazel index 107926dd..9dbce86a 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -5,14 +5,15 @@ module( ) bazel_dep(name = "boringssl", version = "0.20250311.0") -bazel_dep(name = "civetweb", version = "1.16.bcr.1") -bazel_dep(name = "curl", version = "8.8.0.bcr.3") +bazel_dep(name = "civetweb", version = "1.16.bcr.4") +bazel_dep(name = "curl", version = "8.12.0.bcr.1") bazel_dep(name = "platforms", version = "0.0.11") bazel_dep(name = "rules_cc", version = "0.1.1") bazel_dep(name = "zlib", version = "1.3.1.bcr.5") -bazel_dep(name = "google_benchmark", version = "1.9.1", dev_dependency = True) -bazel_dep(name = "googletest", version = "1.16.0", dev_dependency = True) +bazel_dep(name = "google_benchmark", version = "1.9.5", dev_dependency = True) +bazel_dep(name = "googletest", version = "1.17.0.bcr.2", dev_dependency = True) +bazel_dep(name = "rules_shell", version = "0.8.0", dev_dependency = True) # due to # https://github.com/bazelbuild/bazel/issues/24426 diff --git a/core/BUILD.bazel b/core/BUILD.bazel index a302f195..4a6401c2 100644 --- a/core/BUILD.bazel +++ b/core/BUILD.bazel @@ -1,3 +1,4 @@ +load("@rules_cc//cc:cc_library.bzl", "cc_library") load("//bazel:export_header.bzl", "generate_dummy_export_header") generate_dummy_export_header( diff --git a/core/benchmarks/BUILD.bazel b/core/benchmarks/BUILD.bazel index fefc940b..779248b5 100644 --- a/core/benchmarks/BUILD.bazel +++ b/core/benchmarks/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_cc//cc:cc_binary.bzl", "cc_binary") + cc_binary( name = "benchmarks", srcs = glob([ diff --git a/core/tests/BUILD.bazel b/core/tests/BUILD.bazel index 74636d82..e791d05c 100644 --- a/core/tests/BUILD.bazel +++ b/core/tests/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_cc//cc:cc_test.bzl", "cc_test") + cc_test( name = "unit", srcs = glob([ diff --git a/pull/BUILD.bazel b/pull/BUILD.bazel index 838d3d13..54000856 100644 --- a/pull/BUILD.bazel +++ b/pull/BUILD.bazel @@ -1,3 +1,4 @@ +load("@rules_cc//cc:cc_library.bzl", "cc_library") load("//bazel:export_header.bzl", "generate_dummy_export_header") generate_dummy_export_header( diff --git a/pull/tests/integration/BUILD.bazel b/pull/tests/integration/BUILD.bazel index f4b7b6b0..1e347e8f 100644 --- a/pull/tests/integration/BUILD.bazel +++ b/pull/tests/integration/BUILD.bazel @@ -1,3 +1,7 @@ +load("@rules_cc//cc:cc_binary.bzl", "cc_binary") +load("@rules_cc//cc:cc_test.bzl", "cc_test") +load("@rules_shell//shell:sh_test.bzl", "sh_test") + cc_binary( name = "sample-server", srcs = ["sample_server.cc"], diff --git a/pull/tests/integration/scrape.sh b/pull/tests/integration/scrape.sh index 5b1297f1..e88944bc 100755 --- a/pull/tests/integration/scrape.sh +++ b/pull/tests/integration/scrape.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash -telegraf=$(which telegraf) -if [ ! -x "$telegraf" ] ; then +: "${TELEGRAF:=$(which telegraf)}" + +if [ ! -x "$TELEGRAF" ] ; then echo "telegraf must be in path for this test to run" exit 1 fi @@ -16,4 +17,4 @@ trap 'kill $(jobs -p)' EXIT timeout_after 10 pull/tests/integration/sample-server & -telegraf --config pull/tests/integration/scrape.conf --quiet | grep -m1 http_requests_total +"$TELEGRAF" --config pull/tests/integration/scrape.conf --quiet | grep -m1 http_requests_total diff --git a/pull/tests/unit/BUILD.bazel b/pull/tests/unit/BUILD.bazel index d84ff888..72fe3399 100644 --- a/pull/tests/unit/BUILD.bazel +++ b/pull/tests/unit/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_cc//cc:cc_test.bzl", "cc_test") + cc_test( name = "unit", srcs = glob(["*.cc"]), diff --git a/push/BUILD.bazel b/push/BUILD.bazel index ca0cf812..25907e91 100644 --- a/push/BUILD.bazel +++ b/push/BUILD.bazel @@ -1,3 +1,4 @@ +load("@rules_cc//cc:cc_library.bzl", "cc_library") load("//bazel:export_header.bzl", "generate_dummy_export_header") generate_dummy_export_header( diff --git a/push/tests/integration/BUILD.bazel b/push/tests/integration/BUILD.bazel index 70e449da..5c9d8384 100644 --- a/push/tests/integration/BUILD.bazel +++ b/push/tests/integration/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_cc//cc:cc_binary.bzl", "cc_binary") + cc_binary( name = "sample_client", srcs = ["sample_client.cc"], diff --git a/push/tests/internal/BUILD.bazel b/push/tests/internal/BUILD.bazel index cfb403fc..f422bb56 100644 --- a/push/tests/internal/BUILD.bazel +++ b/push/tests/internal/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_cc//cc:cc_test.bzl", "cc_test") + cc_test( name = "internal", srcs = glob(["*.cc"]), diff --git a/util/BUILD.bazel b/util/BUILD.bazel index e9e8a31a..690cb80b 100644 --- a/util/BUILD.bazel +++ b/util/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_cc//cc:cc_library.bzl", "cc_library") + cc_library( name = "util", hdrs = glob(["include/**/*.h"]), diff --git a/util/tests/unit/BUILD.bazel b/util/tests/unit/BUILD.bazel index 8603ab60..c1fb8a05 100644 --- a/util/tests/unit/BUILD.bazel +++ b/util/tests/unit/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_cc//cc:cc_test.bzl", "cc_test") + cc_test( name = "unit", srcs = glob(["*.cc"]),