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