tests: define tests via flake

Advantages:
- Pure test evaluations
- The test framework can now be used by flakes that extend nix-bitcoin
- Most features of `run-tests.sh` are now accessible via `nix build`/`nix run`.
  We keep `run-tests.sh` for advanced features like `scenarioOverridesFile` and adhoc scenarios.

Other changes:
- `run-tests.sh` now builds aggregate VM tests like `basic` or
  `buildable` by creating all VMs in a single evaluation.
  This speeds up the tests and eases debugging by separating the eval and build steps.
- Use the new `nix` CLI which has improved build output logging
  by prefixing output lines with the origin drv name.
This commit is contained in:
Erik Arvstedt 2022-10-22 19:37:58 +02:00
parent 90e942e5ae
commit edbaeb9813
No known key found for this signature in database
GPG key ID: 33312B944DD97846
12 changed files with 451 additions and 277 deletions

23
flake.lock generated
View file

@ -1,5 +1,27 @@
{
"nodes": {
"extra-container": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1666443795,
"owner": "erikarvstedt",
"repo": "extra-container",
"rev": "3b69ecfd363983cdee4db7f5d118b0ca099d23ed",
"type": "github"
},
"original": {
"owner": "erikarvstedt",
"repo": "extra-container",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1659877975,
@ -49,6 +71,7 @@
},
"root": {
"inputs": {
"extra-container": "extra-container",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"