Commit 4f638a2
Add C++17 unit tests and fix CI to use ros:noetic-robot Docker image
C++ unit tests (gps_agent_pkg/test/):
- test_options_variant.cpp: 28 tests for std::variant OptionsVariant and
OptionsMap — exercises holds_alternative, std::get, bad_variant_access,
rebinding, and simulated controller config patterns
- test_util.cpp: 13 tests for util::split() and to_string<T>() (pure stdlib)
- test_obs_normalization.cpp: 13 tests for the PyTorchController obs
normalization formula extracted verbatim from pytorchcontroller.cpp;
covers identity, NaN/Inf propagation, and linearity properties
- test/CMakeLists.txt: standalone build (no ROS, no LibTorch) used by the
TSan CI job to avoid LibTorch+TSan incompatibility
gps_agent_pkg/CMakeLists.txt:
- Add find_package(Protobuf REQUIRED) + add_custom_command to generate
gps.pb.h/gps.pb.cc at build time; replaces fragile ../build/gps path hack
- Add GPS_PB_CC to DDP_FILES so the proto source is compiled into the lib
- Add if(CATKIN_ENABLE_TESTING) block with catkin_add_gtest targets for all
three unit tests; set GPS_PROTO_GEN_DIR on include path
.github/workflows/ci.yml:
- cpp-build: replace broken ros-humble+catkin_make+||true job with
container: ros:noetic-robot (Ubuntu 20.04 + ROS 1 Noetic), installs PR2
packages and CPU LibTorch via pip, runs catkin_make + run_tests +
catkin_test_results (no || true, real failure detection)
- tsan: replace broken job with standalone cmake build of test/ using
clang-15 + -fsanitize=thread, runs ctest -V on the three unit tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent c6ce8fe commit 4f638a2
File tree
6 files changed
+808
-55
lines changed- .github/workflows
- gps_agent_pkg
- test
6 files changed
+808
-55
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
180 | 183 | | |
181 | 184 | | |
182 | | - | |
| 185 | + | |
183 | 186 | | |
| 187 | + | |
| 188 | + | |
184 | 189 | | |
185 | 190 | | |
186 | 191 | | |
187 | 192 | | |
188 | | - | |
| 193 | + | |
189 | 194 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
194 | 199 | | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
202 | 216 | | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
212 | 231 | | |
213 | 232 | | |
214 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
215 | 236 | | |
216 | 237 | | |
217 | | - | |
| 238 | + | |
218 | 239 | | |
219 | 240 | | |
220 | 241 | | |
| |||
223 | 244 | | |
224 | 245 | | |
225 | 246 | | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
231 | 253 | | |
232 | | - | |
| 254 | + | |
233 | 255 | | |
234 | | - | |
235 | | - | |
236 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
237 | 259 | | |
238 | 260 | | |
239 | 261 | | |
240 | 262 | | |
241 | | - | |
242 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
243 | 270 | | |
244 | 271 | | |
245 | | - | |
| 272 | + | |
246 | 273 | | |
247 | 274 | | |
248 | 275 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
36 | | - | |
37 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
38 | 69 | | |
39 | 70 | | |
40 | 71 | | |
| |||
58 | 89 | | |
59 | 90 | | |
60 | 91 | | |
61 | | - | |
| 92 | + | |
62 | 93 | | |
63 | 94 | | |
64 | 95 | | |
| |||
79 | 110 | | |
80 | 111 | | |
81 | 112 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| 113 | + | |
| 114 | + | |
87 | 115 | | |
| 116 | + | |
88 | 117 | | |
89 | 118 | | |
90 | 119 | | |
| |||
105 | 134 | | |
106 | 135 | | |
107 | 136 | | |
| 137 | + | |
108 | 138 | | |
109 | | - | |
110 | 139 | | |
111 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
112 | 145 | | |
113 | 146 | | |
114 | 147 | | |
| |||
123 | 156 | | |
124 | 157 | | |
125 | 158 | | |
126 | | - | |
| 159 | + | |
127 | 160 | | |
128 | 161 | | |
129 | 162 | | |
| |||
156 | 189 | | |
157 | 190 | | |
158 | 191 | | |
159 | | - | |
160 | | - | |
161 | 192 | | |
162 | 193 | | |
163 | 194 | | |
| |||
191 | 222 | | |
192 | 223 | | |
193 | 224 | | |
194 | | - | |
| 225 | + | |
195 | 226 | | |
196 | 227 | | |
197 | 228 | | |
198 | 229 | | |
199 | 230 | | |
200 | | - | |
201 | 231 | | |
202 | 232 | | |
| 233 | + | |
| 234 | + | |
203 | 235 | | |
204 | 236 | | |
205 | | - | |
| 237 | + | |
206 | 238 | | |
207 | 239 | | |
208 | 240 | | |
| 241 | + | |
209 | 242 | | |
210 | 243 | | |
211 | 244 | | |
| |||
226 | 259 | | |
227 | 260 | | |
228 | 261 | | |
229 | | - | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
230 | 268 | | |
231 | 269 | | |
232 | 270 | | |
233 | 271 | | |
234 | 272 | | |
235 | 273 | | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
236 | 327 | | |
0 commit comments