diff --git a/pkgs/default.nix b/pkgs/default.nix index 6ce69cc9..ffe6d8ff 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -59,14 +59,29 @@ pkgs { racketBuildInputs = builtins.filter (input: input.name != "compiler-lib") oldAttrs.racketBuildInputs; }); - fractalide-tests = self.runCommand "fractalide-tests" { - buildInputs = [ fractalide-tests-pkg.env ]; + fractalide-tests = let + 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 self.time ]; + inherit racoTest; } '' - racket -l- raco test ${fractalide-tests-pkg.env}/share/racket/pkgs/*/modules/rkt/rkt-fbp/agents + # If we do raco test the discovery process will try to mkdir $HOME. + # If we allow raco test to run on anything in agents/gui it will fail because + # requiring gui fails on headless. + + find ${fractalide-tests-pkg.env}/share/racket/pkgs/*/modules/rkt/rkt-fbp/agents \ + '(' -name gui -prune ')' -o '(' -name '*.rkt' -print ')' | + 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; }) ]; + buildInputs = [ (fractalide.override { flat = true; }).env self.parallel self.time ]; }); }) ];