2 ##############################################################################
4 # Copyright (c) 2020 AT&T Intellectual Property.
5 # Copyright (c) 2020 Nokia.
6 # Copyright (c) 2020 HCL Technologies
8 # Licensed under the Apache License, Version 2.0 (the "License");
9 # you may not use this file except in compliance with the License.
10 # You may obtain a copy of the License at
12 # http://www.apache.org/licenses/LICENSE-2.0
14 # Unless required by applicable law or agreed to in writing, software
15 # distributed under the License is distributed on an "AS IS" BASIS,
16 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 # See the License for the specific language governing permissions and
18 # limitations under the License.
20 ##############################################################################
22 # Installs prerequisites needed to compile & test SDL code
23 # and build RPM/DEB packages on a Debian/Ubuntu machine.
25 echo "--> setup-dbaas-build-deb.sh"
27 # Ensure we fail the job if any steps fail.
30 # NOTE: The valgrind false positive problem could also potentially be solved
31 # with valgrind suppression files but that kind of approach may be fragile.
34 sudo apt-get update && sudo apt-get -q -y install \
47 # Cpputest built-in memory checks generate false positives in valgrind.
48 # This is solved by compiling cpputest with memory checking disabled.
50 mkdir -p cpputest/builddir
53 curl -L https://github.com/cpputest/cpputest/releases/download/v3.8/cpputest-3.8.tar.gz | \
54 tar --strip-components=1 -xzf -
56 cmake -DMEMORY_LEAK_DETECTION=OFF .. && \
59 # generate configure script
65 # generate configure script with memory checking disabled.
68 ./configure --disable-unit-test-memcheck && \
72 #Copy configure to $WORKSPACE
76 echo "--> setup-dbaas-build-deb.sh ends"