1/* 2Run with: 3nix-build -E 'with import <nixpkgs> { }; callPackage ./test.nix {}' --show-trace; and cat result 4 5Confusingly, the ideal result ends with something like: 6error: build of /nix/store/3245f3dcl2wxjs4rci7n069zjlz8qg85-test-results.tap.drv failed 7*/ 8{ writeText, lib, callPackage, testFiles, ruby }@defs: 9let 10 testTools = rec { 11 test = import ./testing.nix; 12 stubs = import ./stubs.nix defs; 13 should = import ./assertions.nix { inherit test lib; }; 14 }; 15 16 tap = import ./tap-support.nix; 17 18 results = builtins.concatLists (map (file: callPackage file testTools) testFiles); 19in 20 writeText "test-results.tap" (tap.output results)