Skip to content

Commit 72f7d51

Browse files
committed
interactive-html-bom: add test
1 parent 94dca88 commit 72f7d51

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

pkgs/by-name/in/interactive-html-bom/package.nix

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
22
fetchFromGitHub,
33
lib,
4+
kicad,
45
python3Packages,
6+
xvfb-run,
57
}:
68

79
python3Packages.buildPythonApplication rec {
@@ -24,8 +26,18 @@ python3Packages.buildPythonApplication rec {
2426
python3Packages.kicad
2527
];
2628

27-
# has no tests
28-
doCheck = false;
29+
nativeCheckInputs = [
30+
xvfb-run
31+
];
32+
33+
checkPhase = ''
34+
runHook preCheck
35+
36+
cp ${kicad.base}/share/kicad/demos/stickhub/StickHub.kicad_pcb .
37+
HOME=$(mktemp -d) xvfb-run $out/bin/generate_interactive_bom --no-browser StickHub.kicad_pcb
38+
39+
runHook postCheck
40+
'';
2941

3042
meta = {
3143
description = "Interactive HTML BOM generation for KiCad, EasyEDA, Eagle, Fusion360 and Allegro PCB designer";

0 commit comments

Comments
 (0)