Timo Aaltonen pushed to branch debian-unstable at X Strike Force / vulkan / vulkan-loader
Commits: bb19696d by Simon McVittie at 2020-03-16T15:17:15+00:00 d/tests: Add a superficial smoke-test for libvulkan-dev Compiling and linking what is essentially "hello, world" against a library is not a thorough test, but can detect surprisingly many library packaging mistakes, so I've started writing a superficial test like this for every library I backport or otherwise work on. Signed-off-by: Simon McVittie <s...@collabora.com> - - - - - b30d231c by Timo Aaltonen at 2020-04-03T10:24:21+00:00 Merge branch 'autopkgtest' into 'debian-unstable' d/tests: Add a superficial smoke-test for libvulkan-dev See merge request xorg-team/vulkan/vulkan-loader!2 - - - - - 2 changed files: - + debian/tests/control - + debian/tests/libvulkan-dev Changes: ===================================== debian/tests/control ===================================== @@ -0,0 +1,4 @@ +Tests: libvulkan-dev +Restrictions: allow-stderr, superficial +Depends: + libvulkan-dev, ===================================== debian/tests/libvulkan-dev ===================================== @@ -0,0 +1,33 @@ +#!/bin/sh +# Copyright 2020 Collabora Ltd. +# SPDX-License-Identifier: MIT + +set -eux + +CROSS_COMPILE="${DEB_HOST_GNU_TYPE:+"${DEB_HOST_GNU_TYPE}-"}" + +cat > simple.c <<EOF +#include <vulkan/vulkan.h> + +#include <stdio.h> + +int main (void) +{ + void (*func) (void); + + func = vkGetInstanceProcAddr(NULL, "vkCreateInstance"); + + if (func == NULL) { + printf ("Failed to find vkCreateInstance\n"); + return 1; + } + + printf ("vkCreateInstance -> %p\n", (void *) func); + return 0; +} +EOF + +# Deliberately word-splitting pkg-config's output: +# shellcheck disable=SC2046 +"${CROSS_COMPILE}gcc" -osimple simple.c $("${CROSS_COMPILE}pkg-config" --cflags --libs vulkan) +./simple View it on GitLab: https://salsa.debian.org/xorg-team/vulkan/vulkan-loader/-/compare/210c10a207969e8f57278b231c9d11e88deb8c3c...b30d231c029f063383144abc267ce1f3f49b5cd3 -- View it on GitLab: https://salsa.debian.org/xorg-team/vulkan/vulkan-loader/-/compare/210c10a207969e8f57278b231c9d11e88deb8c3c...b30d231c029f063383144abc267ce1f3f49b5cd3 You're receiving this email because of your account on salsa.debian.org.