From: Bastian Dehn Date: Thu, 16 Jul 2026 13:29:06 +0000 (+0200) Subject: add bats test sanity check X-Git-Tag: v1.1.35^2~3^2~13 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=738a285ca32aa7ac6ac065dc22d8dc76370a7983;p=sane-kds-s2000w-net.git add bats test sanity check --- diff --git a/builder/Containerfile.template b/builder/Containerfile.template index d1ad6ce..32f8274 100644 --- a/builder/Containerfile.template +++ b/builder/Containerfile.template @@ -23,6 +23,9 @@ RUN apt-get update \ imagemagick \ libmagickcore-dev \ libcmocka-dev \ + bats \ + bats-assert \ + bats-support \ && apt-get clean \ && rm --recursive --force /var/lib/apt/lists/* COPY run /app/run diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 82226be..d1bf2d7 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -33,6 +33,9 @@ add_custom_target(runningtests ALL ./tests WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DEPENDS tests) +add_custom_target(runningbatstests + ALL ./postinst.bats + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) add_custom_command(TARGET runningtests POST_BUILD COMMAND gcov ${CMAKE_BINARY_DIR}/src/CMakeFiles/sane-kds_s2000w_net-static.dir/*.c.o diff --git a/tests/postinst.bats b/tests/postinst.bats new file mode 100755 index 0000000..14cc794 --- /dev/null +++ b/tests/postinst.bats @@ -0,0 +1,10 @@ +#!/usr/bin/bats + +setup() { + bats_load_library bats-support + bats_load_library bats-assert +} + +@test "sanity" { + assert_equal 1 1 +}