Skip to content

Run tests purely in Nix #241

@srid

Description

@srid

While #240 builds on Darwin, it doesn't on Linux. We could probably define all flakes as inputs, transitively, and build the various tests.

❯ nix --option sandbox false build -L --override-input haskell-flake . ./test#checks.aarch64-linux.tests
[..]
tests> ||| Testing ./nix/haskell-parsers
tests> ~/haskell-flake/nix/haskell-parsers ~/haskell-flake
tests> nix (Nix) 2.18.1
tests> warning: you don't have Internet access; disabling some network-dependent features
tests> warning: you don't have Internet access; disabling some network-dependent features
tests> m
tests> warning: you don't have Internet access; disabling some network-dependent features
tests> error:
tests>        … while evaluating the attribute 'cabal.project'
tests>          at /build/tmp.FYTZcVTgye/haskell-flake/nix/haskell-parsers/parser_tests.nix:65:3:
tests>            64| {
tests>            65|   "cabal.project" = runTestsFailing cabalProjectTests;
tests>              |   ^
tests>            66|   "foo-bar.cabal" = runTestsFailing cabalExecutableTests;
tests>        … while evaluating a branch condition
tests>          at /build/tmp.FYTZcVTgye/haskell-flake/nix/haskell-parsers/parser_tests.nix:60:5:
tests>            59|     in
tests>            60|     if res == builtins.trace "All tests passed" [ ]
tests>              |     ^
tests>            61|     then res
tests>        (stack trace truncated; use '--show-trace' to show the full trace)
tests>        error: unable to download 'https://channels.nixos.org/flake-registry.json': Couldn't resolve host name (6)

Tasks

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions