#!/bin/sh
# autopkgtest check: Build and run a program tetgen
# (C) 2018 Anton Gladky
# Author:  Anton Gladky <gladk@debian.org>

set -e

WORKDIR=$(mktemp -d)

echo $WORKDIR
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cp debian/tests/tetgen_example.cpp $WORKDIR
cd $WORKDIR

g++ -DTETLIBRARY tetgen_example.cpp -ltet -o tetgen_example

echo "build: OK"

[ -x tetgen_example ]
./tetgen_example > output

ls -ln

cat output

echo "run: OK"
