]> git.saurik.com Git - apt.git/blob - test/integration/header-compilation
apt-key: change to / before find to satisfy its CWD needs
[apt.git] / test / integration / header-compilation
1 #!/bin/sh
2 set -e
3
4 TESTDIR="$(readlink -f "$(dirname "$0")")"
5 . "$TESTDIR/framework"
6 setupenvironment
7
8 (for i in $TESTDIR/../../build/include/apt-pkg/*.h; do echo "#include \"$i\""; done) > include.h
9
10
11 testone() {
12 local cxx=$1
13 shift
14
15 if type $cxx 2>&1 1>/dev/null; then
16 testsuccess $cxx -c -o /dev/null include.h
17 testsuccess $cxx -c -o /dev/null -std=c++98 include.h
18 testsuccess $cxx -c -o /dev/null -std=c++11 include.h
19 else
20 msgskip "Compile $cxx is not installed"
21 fi
22 }
23
24 testone clang++
25 testone g++
26 testone g++-4.8