Debian Codegraph @

test/compile-test.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2 #
3 # Copyright (C) 2017 - 2022, Stephan Mueller <[email protected]>
4 #
5 # License: see LICENSE file in root directory
6 #
7 # THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
8 # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
9 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
10 # WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
11 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
12 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
13 # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
14 # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
15 # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
16 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
17 # USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
18 # DAMAGE.
19 #
20 # This test tries to compile all code and tries to install it
21 #
22
23 DIRNAME="$(dirnamescip-shell system . . dirname. "$0")"
24 . "$DIRNAME/libtest.sh"
25
26 if [scip-shell system . . `[`. "$KCAPI_TEST_LOCAL" -ne 1 ]; then
27 echoscip-shell system . . echo. "Compile test can only be run in a local test!"
28 exit 1
29 fi
30
31 INSTALLTARGET="$(pwdscip-shell system . . pwd.)/tmp-install"
32
33 check_resultscip-shell shell shell-project 0.0.0 check_result().()
34 {
35 local result=$1
36 shift
37 local info=$@
38
39 if [scip-shell system . . `[`. $result -eq 0 ]
40 then
41 echo_pass $info
42 else
43 echo_fail $result $info
44 failures=$(($failures+1))
45 exit $result
46 fi
47 }
48
49 trap "rm -rf $INSTALLTARGET; exit" 0 1 2 3 15
50
51 mkdirscip-shell system . . mkdir. -p $INSTALLTARGET
52 cd "$DIRNAME/.."
53 makescip-shell system . . make. distclean > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
54 ./configure --enable-kcapi-test \
55 --enable-kcapi-speed \
56 --enable-kcapi-hasher \
57 --enable-kcapi-rngapp \
58 --enable-kcapi-encapp \
59 --enable-kcapi-dgstapp \
60 --enable-lib-asym \
61 --enable-lib-kpp \
62 --prefix=$INSTALLTARGET
63 check_resultscip-shell shell shell-project 0.0.0 check_result(). $? "configure"
64
65 makescip-shell system . . make. -j8; check_resultscip-shell shell shell-project 0.0.0 check_result(). $? "make -j8"
66 makescip-shell system . . make. install; check_resultscip-shell shell shell-project 0.0.0 check_result(). $? "make install"
67 makescip-shell system . . make. pdf; check_resultscip-shell shell shell-project 0.0.0 check_result(). $? "make pdf"
68 makescip-shell system . . make. man; check_resultscip-shell shell shell-project 0.0.0 check_result(). $? "make man"
69 makescip-shell system . . make. ps; check_resultscip-shell shell shell-project 0.0.0 check_result(). $? "make ps"
70 makescip-shell system . . make. html; check_resultscip-shell shell shell-project 0.0.0 check_result(). $? "make html"
71 makescip-shell system . . make. distclean; check_resultscip-shell shell shell-project 0.0.0 check_result(). $? "make distclean"
72
73 check_resultscip-shell shell shell-project 0.0.0 check_result(). $failures "Final result"