naersk/test
Patryk Wychowaniec 78789c30d6 Fix support for .cargo/config
Before https://github.com/nix-community/naersk/pull/300, our
`builtinz.toTOML` used to return a string representing the serialized
document which was later redirected into a file:

https://github.com/nix-community/naersk/pull/300/files#diff-b6b537316f2d29c8faf178a110366796811d1bc72f694262c7d2efad79aa984bL238

Over that merge request, this was changed to return a path, to make it
consistent with how nixpkgs' formatters work - but I haven't noticed one
place that still _read_ the file instead of returning a path (which was
fine before, since the code did `echo ... > ...`, but is not a correct
thing to do for `cp`).

Closes https://github.com/nix-community/naersk/issues/305.
2023-08-18 11:40:12 +02:00
..
fast Fix support for .cargo/config 2023-08-18 11:40:12 +02:00
slow Use custom writeTOML on older nixpkgs 2023-08-16 11:32:57 +02:00
default.nix Use TOML serializer from nixpkgs 2023-08-16 11:32:57 +02:00
README.md refactor: Refactor tests into separate files 2022-05-03 12:41:13 +02:00

Tests

This directory contains a handful of naersk's tests; you can run them locally with:

# First, you have to be in the naersk's top-level directory:
$ cd ..

# Then:
$ ./script/test

Caveats

Dynamically-built Git repositories

Some tests (their READMEs will tell you which ones) utilize dynamically-built Git repositories (i.e. repositories built ad hoc during the testing through pkgs.runCommand).

Those tests' Cargo.toml and Cargo.lock contain variables (e.g. $depPath, $depRev etc.) that are substituted through our Nix code before the test is run.

Because of that, it's not possible to execute those tests via cargo test (for whatever the reason you'd like to).