diff --git a/pkgs/default.nix b/pkgs/default.nix index 77bcfde6..9f97c464 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -59,15 +59,15 @@ pkgs { }); fractalide-tests = let - # parallel cannot quite handle full inline bash, and destroys quoting, so we can't use bash -c + # parallel cannot quite handle full inline bash, and destroys quoting, so we can't use bash -c racoTest = builtins.toFile "raco-test.sh" '' racket -l- raco test "$@" |& grep -v -e "warning: tool .* registered twice" -e "@[(]test-responsible" exit ''${PIPESTATUS[0]} ''; in self.runCommand "fractalide-tests" { - buildInputs = [ fractalide-tests-pkg.env self.parallel ]; + buildInputs = [ fractalide-tests-pkg.env self.parallel self.time ]; inherit racoTest; } '' # If we do raco test the discovery process will try to mkdir $HOME. @@ -76,10 +76,14 @@ pkgs { find ${fractalide-tests-pkg.env}/share/racket/pkgs/*/modules/rkt/rkt-fbp/agents \ '(' -name gui -prune ')' -o '(' -name '*.rkt' -print ')' | - parallel -n 1 -j ''${NIX_BUILD_CORES:-1} bash $racoTest | + time -p parallel -n 1 -j ''${NIX_BUILD_CORES:-1} bash $racoTest | tee $out exit ''${PIPESTATUS[1]} ''; + + fractalide-tests-flat = fractalide-tests.overrideAttrs (oldAttrs: { + buildInputs = [ (fractalide.override { flat = true; }).env self.parallel self.time ]; + }); }) ]; }