3 # Copyright (C) 2015 - Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
4 # Michael Jeanson <mjeanson@efficios.com>
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 # Create build directory
21 rm -rf $WORKSPACE/build
22 mkdir
-p $WORKSPACE/build
25 URCU_INCS
="$WORKSPACE/deps/liburcu/build/include/"
26 URCU_LIBS
="$WORKSPACE/deps/liburcu/build/lib/"
29 UST_INCS
="$WORKSPACE/deps/lttng-ust/build/include/"
30 UST_LIBS
="$WORKSPACE/deps/lttng-ust/build/lib/"
33 BABEL_INCS
="$WORKSPACE/deps/babeltrace/build/include/"
34 BABEL_LIBS
="$WORKSPACE/deps/babeltrace/build/lib/"
35 BABEL_BINS
="$WORKSPACE/deps/babeltrace/build/bin/"
37 PREFIX
="$WORKSPACE/build"
39 if [ "$conf" = "no_ust" ]
41 export CPPFLAGS
="-I$URCU_INCS"
42 export LDFLAGS
="-L$URCU_LIBS"
43 export LD_LIBRARY_PATH
="$URCU_LIBS:$BABEL_LIBS:${LD_LIBRARY_PATH:-}"
45 export CPPFLAGS
="-I$URCU_INCS -I$UST_INCS"
46 export LDFLAGS
="-L$URCU_LIBS -L$UST_LIBS"
47 export LD_LIBRARY_PATH
="$URCU_LIBS:$UST_LIBS:$BABEL_LIBS:${LD_LIBRARY_PATH:-}"
56 CONF_OPTS
="--enable-static --disable-shared"
59 echo "Build with python bindings"
60 # We only support bindings built with Python 3
61 export PYTHON
="python3"
62 export PYTHON_CONFIG
="/usr/bin/python3-config"
63 CONF_OPTS
="--enable-python-bindings"
66 echo "Build without UST support"
67 CONF_OPTS
="--disable-lttng-ust"
76 # oot : out-of-tree build
77 # dist: build via make dist
78 # * : normal tree build
80 # Make sure to move to the build_path and configure
86 echo "Out of tree build"
87 BUILD_PATH
=$WORKSPACE/oot
90 $WORKSPACE/configure
--prefix=$PREFIX $CONF_OPTS
93 echo "Distribution out of tree build"
94 BUILD_PATH
=`mktemp -d`
96 # Initial configure and generate tarball
101 cp *.
tar.
* $BUILD_PATH/
104 # Ignore level 1 of tar
105 tar xvf
*.
tar.
* --strip 1
107 $BUILD_PATH/configure
--prefix=$PREFIX $CONF_OPTS
110 BUILD_PATH
=$WORKSPACE
111 echo "Standard tree build"
112 $WORKSPACE/configure
--prefix=$PREFIX $CONF_OPTS
124 chmod +x
$BABEL_BINS/babeltrace
125 export PATH
="$PATH:$BABEL_BINS"
127 rm -rf $WORKSPACE/tap
128 mkdir
-p $WORKSPACE/tap
129 mkdir
-p $WORKSPACE/tap
/unit
130 mkdir
-p $WORKSPACE/tap
/fast_regression
131 mkdir
-p $WORKSPACE/tap
/with_bindings_regression
135 if [ "$conf" = "std" ]
137 prove
--merge --exec '' - < $BUILD_PATH/tests
/unit_tests
--archive $WORKSPACE/tap
/unit
/ || true
138 prove
--merge --exec '' - < $BUILD_PATH/tests
/fast_regression
--archive $WORKSPACE/tap
/fast_regression
/ || true
141 if [ "$conf" = "no_ust" ]
143 # Regression is disabled for now, we need to adjust the testsuite for no ust builds.
144 echo "Testsuite disabled. See job configuration for more info."
147 if [ "$conf" = "python_bindings" ]
149 # Disabled due to race conditions in tests
150 echo "Testsuite disabled. See job configuration for more info."
151 prove
--merge --exec '' - < $BUILD_PATH/tests
/unit_tests
--archive $WORKSPACE/tap
/unit
/ || true
152 prove
--merge --exec '' - < $BUILD_PATH/tests
/fast_regression
--archive $WORKSPACE/tap
/fast_regression
/ || true
153 prove
--merge --exec '' - < $BUILD_PATH/tests
/with_bindings_regression
--archive $WORKSPACE/tap
/with_bindings_regression
/ || true
156 # TAP plugin is having a hard time with .yml files.
157 rm -f $WORKSPACE/tap
/unit
/meta.yml
158 rm -f $WORKSPACE/tap
/fast_regression
/meta.yml
159 rm -f $WORKSPACE/tap
/with_bindings_regression
/meta.yml
161 # And also with files without extension, so rename all result to *.tap
162 find $WORKSPACE/tap
/unit
/ -type f
-exec mv {} {}.tap \
;
163 find $WORKSPACE/tap
/fast_regression
/ -type f
-exec mv {} {}.tap \
;
164 find $WORKSPACE/tap
/with_bindings_regression
/ -type f
-exec mv {} {}.tap \
;
169 # Cleanup rpath and libtool .la files
170 find $WORKSPACE/build
/bin
-executable -type f
-exec chrpath
--delete {} \
;
171 find $WORKSPACE/build
/lib
-name "*.so" -exec chrpath
--delete {} \
;
172 find $WORKSPACE/build
/lib
-name "*.la" -exec rm -f {} \
;
174 # Clean temp dir for dist build
175 if [ $build = "dist" ]; then
This page took 0.033158 seconds and 4 git commands to generate.