Skip to content

Commit f44862a

Browse files
committed
test(driver): driver loader available
1 parent f0359da commit f44862a

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.github/scripts/build-ci.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ make)
2222
cmake "$WORKSPACE" -DSTANDALONE_MODE=ON -DLPAC_WITH_APDU_AT=ON
2323
make -j VERBOSE=1
2424
make DESTDIR="$PKGDIR" install
25+
26+
test-driver-available # test driver loader works
27+
2528
copy-license "$PKGDIR/executables"
2629
copy-usage "$PKGDIR/executables"
2730
create-bundle "$ARTIFACT/lpac-$KERNEL-$MACHINE.zip" "$PKGDIR/executables"
@@ -51,6 +54,9 @@ make-without-lto)
5154
cmake "$WORKSPACE" -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF -DSTANDALONE_MODE=ON
5255
make -j VERBOSE=1
5356
make DESTDIR="$PKGDIR" install
57+
58+
test-driver-available # test driver loader works
59+
5460
copy-license "$PKGDIR/executables"
5561
copy-usage "$PKGDIR/executables"
5662
create-bundle "$ARTIFACT/lpac-$KERNEL-$MACHINE-without-lto.zip" "$PKGDIR/executables"

.github/scripts/functions.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,8 @@ function create-bundle {
7979
zip -v -r "$BUNDLE_FILE" ./*
8080
popd
8181
}
82+
83+
function test-driver-available {
84+
env LPAC_APDU=stdio LPAC_HTTP=stdio "$PKGDIR/executables/lpac" driver list | \
85+
jq --exit-status '.payload | [isempty(.LPAC_APDU), isempty(.LPAC_HTTP) | not] | all'
86+
}

0 commit comments

Comments
 (0)