Skip to content

Commit

Permalink
nix: Re-enable panicking tests
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Spinale <[email protected]>
  • Loading branch information
nspin committed Nov 15, 2024
1 parent d6d2b48 commit 5cec0aa
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions hacking/nix/scope/world/instances/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ in rec {
tests.root-task.config
tests.root-task.tls
tests.root-task.backtrace
# tests.root-task.panicking
tests.root-task.panicking
tests.root-task.c
tests.root-task.verus
tests.root-task.dafny
Expand Down Expand Up @@ -192,19 +192,21 @@ in rec {
(_: allocFeatures:
lib.flip lib.mapAttrs profile
(_: release:
maybe (haveFullRuntime && haveUnwindingSupport) (mkInstance {
rootTask = mkTask {
rootCrate = crates.tests-root-task-panicking;
inherit release;
features = allocFeatures ++ [ "panic-${panicStrategyName}" ];
extraProfile = {
panic = panicStrategyName;
let
isUnwind = panicStrategyName == "unwind";
in
maybe (haveFullRuntime && haveUnwindingSupport) (mkInstance {
rootTask = mkTask {
rootCrate = crates.tests-root-task-panicking;
targetTriple = mkSeL4RustTargetTriple { unwind = isUnwind; };
inherit release;
features = allocFeatures ++ [ "panic-${panicStrategyName}" ];
};
};
extraPlatformArgs = lib.optionalAttrs canSimulate {
canAutomateSimply = panicStrategyName == "unwind";
};
}))));
extraPlatformArgs = lib.optionalAttrs canSimulate {
canAutomateSimply = isUnwind;
};
})
)));

paths = lib.mapCartesianProduct
({ panicStrategyName, allocName, profileName }: [ panicStrategyName allocName profileName ])
Expand All @@ -224,9 +226,11 @@ in rec {
value = config.automate;
}));

simulate = writeText "all-panicking-scripts" (toString (lib.forEach paths (path:
(lib.attrByPath path (throw "x") byConfig).simulate
)));
simulate = writeText "all-panicking-scripts" (toString (lib.forEach
(lib.filter
(config: config != null)
(lib.forEach paths (path: lib.attrByPath path (throw "x") byConfig)))
(config: config.simulate)));

links = linkFarm "links" {
inherit simulate;
Expand Down

0 comments on commit 5cec0aa

Please sign in to comment.