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