crane/checks/nextest.nix
Rebecca Turner 174604795d
Add workaround for cargo-nextest bug (#376)
Prevents this error:

```
(...)
dyld: Library not loaded: @rpath/libtest-77ee8c29c330e4a3.dylib
  Referenced from: /private/tmp/holochain_repo/target/fast-test/deps/hdk_derive-73ec051829ad694a
  Reason: image not found
error: creating test list failed
Caused by:
  for `hdk_derive::proc-macro/hdk_derive`, running command `/private/tmp/holochain_repo/target/fast-test/deps/hdk_derive-73ec051829ad694a --list --format terse` failed
Caused by:
  command ["/private/tmp/holochain_repo/target/fast-test/deps/hdk_derive-73ec051829ad694a", "--list", "--format", "terse"] exited with code <signal 6>
Error: Process completed with exit code 104.
```

https://github.com/nextest-rs/nextest/issues/267
2023-08-30 23:44:00 +00:00

45 lines
813 B
Nix

{ cargoNextest
, runCommand
}:
let
nextestSimple = cargoNextest {
src = ./simple;
pname = "nextest-simple";
cargoArtifacts = null;
};
nextestPartitionsCount = cargoNextest {
src = ./simple;
pname = "nextest-partitions-count";
partitions = 4;
partitionType = "count";
cargoArtifacts = null;
};
nextestPartitionsHash = cargoNextest {
src = ./simple;
pname = "nextest-partitions-hash";
partitions = 4;
partitionType = "hash";
cargoArtifacts = null;
};
nextestProcMacro = cargoNextest {
src = ./proc-macro;
pname = "nextest-proc-macro";
cargoArtifacts = null;
};
in
runCommand "nextestTests"
{
buildInputs = [
nextestSimple
nextestPartitionsCount
nextestPartitionsHash
nextestProcMacro
];
} ''
mkdir -p $out
''