depot/third_party/nixpkgs/pkgs/by-name/xu/xunit-viewer/test/example.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

16 lines
540 B
Nix

{ xunit-viewer, runCommand, ... }:
runCommand "test-xunit-viewer" {
nativeBuildInputs = [ xunit-viewer ];
} ''
mkdir $out
xunit-viewer -r ${./example.junit.xml} -o $out/index.html
( set -x
grep '<body' $out/index.html
# Can't easily grep for parts of the original data, because it ends up
# embedded as base64 encoded data (and slightly modified?).
# We'd have to really dissect it or render it with a browser.
# Fortunately, we've already caught the most severe packaging problems
# with just this.
)
''