#!/bin/sh # autopkgtest check: Build and run a program against libacpi, to verify that the # headers are correctly installed # (C) 2013 Vibhav Pant # Author: Vibhav Pant set -e WORKDIR=$(mktemp -d) trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM cd $WORKDIR cat < libacpi_test.c #include int main(void) { global_t global; check_acpi_support(); init_acpi_thermal(&global); read_acpi_acstate(&global); return 0; } EOF gcc -o libacpi_test libacpi_test.c -lacpi -Wall -Werror echo "build: OK" [ -x libacpi_test ] ./libacpi_test echo "run: OK"