#!/bin/sh

set -e

dir=`dirname "$0"`

# change directory to $AUTOPKGTEST_TMP
cd "${AUTOPKGTEST_TMP}"

cleanup() {
  ex=$?
  rm -f testcpucycles.bin
  exit "${ex}"
}
trap "cleanup" EXIT TERM INT

CC="cc -O"
LIBDIR="/usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`"

echo 'libcpucycles - shared:'
${CC} -o testcpucycles.bin "${dir}/../../command/cpucycles-info.c" -lcpucycles -lm -lrt
./testcpucycles.bin

exit 0
