From 87aefc960557c2fb6fdf9ea4c1ac0e7983f68f68 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 10 Apr 2024 22:49:53 +0200 Subject: Adding debian version 255.4-1. Signed-off-by: Daniel Baumann --- debian/tests/build-with-static-libsystemd | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 debian/tests/build-with-static-libsystemd (limited to 'debian/tests/build-with-static-libsystemd') diff --git a/debian/tests/build-with-static-libsystemd b/debian/tests/build-with-static-libsystemd new file mode 100755 index 0000000..6b91009 --- /dev/null +++ b/debian/tests/build-with-static-libsystemd @@ -0,0 +1,38 @@ +#!/bin/sh +# autopkgtest check: Test build against static libsystemd + +set -e + +WORKDIR=$(mktemp -d) +trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM +cd $WORKDIR +cat < uuid-gen.c +#include +#include + +#include + +int main(void) +{ + sd_id128_t id; + char id_str[SD_ID128_STRING_MAX]; + int r; + + r = sd_id128_randomize(&id); + if (r < 0) { + fprintf(stderr, "Failed to generate id: %s\n", strerror(-r)); + return 1; + } + + assert(sd_id128_to_string(id, id_str) > 0); + printf("uuid: %s\n", id_str); + + return 0; +} +EOF + +gcc -Wall -Werror -o uuid-gen uuid-gen.c -l:libsystemd.a -lcap +echo "build: OK" +[ -x uuid-gen ] +./uuid-gen +echo "run: OK" -- cgit v1.2.3