|
263 | 263 | flatMapAttrs |
264 | 264 | ( |
265 | 265 | { |
266 | | - "" = nixpkgsFor.${system}.native; |
| 266 | + # Run all tests with UBSAN enabled. Running both with ubsan and |
| 267 | + # without doesn't seem to have much immediate benefit for doubling |
| 268 | + # the GHA CI workaround. |
| 269 | + # |
| 270 | + # TODO: Work toward enabling "address,undefined" if it seems feasible. |
| 271 | + # This would maybe require dropping Boost coroutines and ignoring intentional |
| 272 | + # memory leaks with detect_leaks=0. |
| 273 | + "" = rec { |
| 274 | + nixpkgs = nixpkgsFor.${system}.native; |
| 275 | + nixComponents = nixpkgs.nixComponents.overrideScope ( |
| 276 | + nixCompFinal: nixCompPrev: { |
| 277 | + mesonComponentOverrides = _finalAttrs: prevAttrs: { |
| 278 | + mesonFlags = |
| 279 | + (prevAttrs.mesonFlags or [ ]) |
| 280 | + # TODO: Macos builds instrumented with ubsan take very long |
| 281 | + # to run functional tests. |
| 282 | + ++ lib.optionals (!nixpkgs.stdenv.hostPlatform.isDarwin) [ |
| 283 | + (lib.mesonOption "b_sanitize" "undefined") |
| 284 | + ]; |
| 285 | + }; |
| 286 | + } |
| 287 | + ); |
| 288 | + }; |
267 | 289 | } |
268 | 290 | // lib.optionalAttrs (!nixpkgsFor.${system}.native.stdenv.hostPlatform.isDarwin) { |
269 | 291 | # TODO: enable static builds for darwin, blocked on: |
270 | 292 | # https://github.com/NixOS/nixpkgs/issues/320448 |
271 | 293 | # TODO: disabled to speed up GHA CI. |
272 | | - #"static-" = nixpkgsFor.${system}.native.pkgsStatic; |
| 294 | + # "static-" = { |
| 295 | + # nixpkgs = nixpkgsFor.${system}.native.pkgsStatic; |
| 296 | + # }; |
273 | 297 | } |
274 | 298 | ) |
275 | 299 | ( |
276 | | - nixpkgsPrefix: nixpkgs: |
277 | | - flatMapAttrs nixpkgs.nixComponents ( |
| 300 | + nixpkgsPrefix: |
| 301 | + { |
| 302 | + nixpkgs, |
| 303 | + nixComponents ? nixpkgs.nixComponents, |
| 304 | + }: |
| 305 | + flatMapAttrs nixComponents ( |
278 | 306 | pkgName: pkg: |
279 | 307 | flatMapAttrs pkg.tests or { } ( |
280 | 308 | testName: test: { |
|
283 | 311 | ) |
284 | 312 | ) |
285 | 313 | // lib.optionalAttrs (nixpkgs.stdenv.hostPlatform == nixpkgs.stdenv.buildPlatform) { |
286 | | - "${nixpkgsPrefix}nix-functional-tests" = nixpkgs.nixComponents.nix-functional-tests; |
| 314 | + "${nixpkgsPrefix}nix-functional-tests" = nixComponents.nix-functional-tests; |
287 | 315 | } |
288 | 316 | ) |
289 | 317 | // devFlake.checks.${system} or { } |
|
0 commit comments