Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions modules/paho.mqtt.cpp/1.3.2/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module(
name = "paho.mqtt.cpp",
version = "1.3.2",
bazel_compatibility = [">=7.2.1"],
compatibility_level = 0,
)

bazel_dep(name = "paho.mqtt.c", version = "1.3.14")
bazel_dep(name = "rules_cc", version = "0.1.1")
14 changes: 14 additions & 0 deletions modules/paho.mqtt.cpp/1.3.2/overlay/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
load("@rules_cc//cc:defs.bzl", "cc_library")

cc_library(
name = "paho.mqtt.cpp",
srcs = glob(["src/*.cpp"]),
hdrs = glob(["src/mqtt/*.h"]),
includes = ["src"],
local_defines = [
"PAHO_MQTTPP_EXPORTS",
"OPENSSL",
],
visibility = ["//visibility:public"],
deps = ["@paho.mqtt.c"],
)
9 changes: 9 additions & 0 deletions modules/paho.mqtt.cpp/1.3.2/overlay/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module(
name = "paho.mqtt.cpp",
version = "1.3.2",
bazel_compatibility = [">=7.2.1"],
compatibility_level = 0,
)

bazel_dep(name = "paho.mqtt.c", version = "1.3.14")
bazel_dep(name = "rules_cc", version = "0.1.1")
18 changes: 18 additions & 0 deletions modules/paho.mqtt.cpp/1.3.2/overlay/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
load("@rules_cc//cc:defs.bzl", "cc_test")

cc_test(
name = "tests",
srcs = glob(
[
"unit/*.cpp",
"unit/*.h",
],
exclude = ["unit/test_async_client_v3.cpp"], # Needs Cppunit
),
local_defines = ["TEST_EXTERNAL_SERVER"],
tags = ["requires-network"],
deps = [
"@catch2",
"@paho.mqtt.cpp",
],
)
8 changes: 8 additions & 0 deletions modules/paho.mqtt.cpp/1.3.2/overlay/test/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
bazel_dep(name = "paho.mqtt.cpp")
local_path_override(
module_name = "paho.mqtt.cpp",
path = "..",
)

bazel_dep(name = "rules_cc", version = "0.1.1")
bazel_dep(name = "catch2", version = "3.8.0")
40 changes: 40 additions & 0 deletions modules/paho.mqtt.cpp/1.3.2/patches/change_test_urls.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
diff --git i/test/unit/test_async_client.cpp w/test/unit/test_async_client.cpp
index b7c4b4f..faf0125 100644
--- i/test/unit/test_async_client.cpp
+++ w/test/unit/test_async_client.cpp
@@ -36,7 +36,8 @@ using namespace mqtt;
// NOTE: This test case requires network access. It uses one of
// the public available MQTT brokers
#if defined(TEST_EXTERNAL_SERVER)
- static const std::string GOOD_SERVER_URI { "tcp://mqtt.eclipse.org:1883" };
+ static const std::string GOOD_SERVER_URI{"tcp://test.mosquitto.org:1883"};
+ static const std::string GOOD_SSL_SERVER_URI{"ssl://test.mosquitto.org:8883"};
#else
static const std::string GOOD_SERVER_URI { "tcp://localhost:1883" };
static const std::string GOOD_SSL_SERVER_URI { "ssl://localhost:18885" };
diff --git i/test/unit/test_async_client_v3.cpp w/test/unit/test_async_client_v3.cpp
index 875e8bb..84461b0 100644
--- i/test/unit/test_async_client_v3.cpp
+++ w/test/unit/test_async_client_v3.cpp
@@ -99,7 +99,7 @@ class async_client_v3_test : public CppUnit::TestFixture
// NOTE: This test case requires network access. It uses one of
// the public available MQTT brokers
#if defined(TEST_EXTERNAL_SERVER)
- const std::string GOOD_SERVER_URI { "tcp://mqtt.eclipse.org:1883" };
+ const std::string GOOD_SERVER_URI { "tcp://test.mosquitto.org:1883" };
#else
const std::string GOOD_SERVER_URI { "tcp://localhost:1883" };
const std::string GOOD_SSL_SERVER_URI { "ssl://localhost:18885" };
diff --git i/test/unit/test_client.cpp w/test/unit/test_client.cpp
index 13cf3e6..e1207f8 100644
--- i/test/unit/test_client.cpp
+++ w/test/unit/test_client.cpp
@@ -40,7 +40,7 @@ using namespace mqtt;
// NOTE: This test case requires network access. It uses one of
// the public available MQTT brokers
#if defined(TEST_EXTERNAL_SERVER)
- static const std::string GOOD_SERVER_URI { "tcp://mqtt.eclipse.org:1883" };
+ static const std::string GOOD_SERVER_URI { "tcp://test.mosquitto.org:1883" };
#else
static const std::string GOOD_SERVER_URI { "tcp://localhost:1883" };
#endif
22 changes: 22 additions & 0 deletions modules/paho.mqtt.cpp/1.3.2/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
matrix:
platform: [debian11, ubuntu2404, macos, macos_arm64]
bazel: &bazels [7.x, 8.x, rolling]

tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
bazel: ${{ bazel }}
build_targets: ["@paho.mqtt.cpp//...", [email protected]//test/...]

bcr_test_module:
matrix:
platform: [debian11, ubuntu2404]
bazel: *bazels
module_path: test
tasks:
run_test_module:
name: Run test module
platform: ${{ platform }}
bazel: ${{ bazel }}
test_targets: [//...]
15 changes: 15 additions & 0 deletions modules/paho.mqtt.cpp/1.3.2/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"url": "https://github.com/eclipse-paho/paho.mqtt.cpp/archive/refs/tags/v1.3.2.tar.gz",
"strip_prefix": "paho.mqtt.cpp-1.3.2",
"integrity": "sha256-wnHVISh/QXECtEez0ejRe+Dg9qOwtlMzTrzSzNINHkY=",
"patch_strip": 1,
"overlay": {
"BUILD.bazel": "sha256-BnwAKY9nKFiCpGUYkxbFPgNBhC/1ktcCNLL0bvuh2n8=",
"MODULE.bazel": "sha256-x2jRzNhvObcsh5xCWERBP8IjsYGpDQG1/uaG2EFjm4M=",
"test/BUILD.bazel": "sha256-+ux35W3iyzSEdYE0XpMLFzaL7Ts2JCMmGcfAy1w3lbk=",
"test/MODULE.bazel": "sha256-qJIKKbbWIUso3jl7FKwoKo6NTNyRWsl7pAjZhviNUc8="
},
"patches": {
"change_test_urls.patch": "sha256-erGiOsQsneCyt9Ms9Fd6TZPd/Jgk52Anija0Rb8RZGQ="
}
}
1 change: 1 addition & 0 deletions modules/paho.mqtt.cpp/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"github:eclipse-paho/paho.mqtt.cpp"
],
"versions": [
"1.3.2",
"1.5.2"
],
"yanked_versions": {}
Expand Down
Loading