1 # Create build directory
2 rm -rf $WORKSPACE/build
3 mkdir
-p $WORKSPACE/build
6 URCU_INCS
="$WORKSPACE/dependencies/liburcu/build/include/"
7 URCU_LIBS
="$WORKSPACE/dependencies/liburcu/build/lib/"
10 UST_INCS
="$WORKSPACE/dependencies/lttng-ust/build/include/"
11 UST_LIBS
="$WORKSPACE/dependencies/lttng-ust/build/lib/"
14 BABEL_INCS
="$WORKSPACE/dependencies/babeltrace/build/include/"
15 BABEL_LIBS
="$WORKSPACE/dependencies/babeltrace/build/lib/"
17 PREFIX
="$WORKSPACE/build"
19 if [ "$conf" = "no_ust" ]
21 export CPPFLAGS
="-I$URCU_INCS"
22 export LDFLAGS
="-L$URCU_LIBS"
23 export LD_LIBRARY_PATH
="$URCU_LIBS:$BABEL_LIBS:$LD_LIBRARY_PATH"
25 export CPPFLAGS
="-I$URCU_INCS -I$UST_INCS"
26 export LDFLAGS
="-L$URCU_LIBS -L$UST_LIBS"
27 export LD_LIBRARY_PATH
="$URCU_LIBS:$UST_LIBS:$BABEL_LIBS:$LD_LIBRARY_PATH"
34 # Currently disabled, ust doesn't seem to be built right for static linking.
37 # CONF_OPTS="--enable-static --disable-shared"
40 echo "Build with python bindings"
41 # We only support bindings built with Python 3
42 export PYTHON
="python3"
43 export PYTHON_CONFIG
="/usr/bin/python3-config"
44 CONF_OPTS
="--enable-python-bindings"
47 echo "Build without UST support"
48 CONF_OPTS
="--disable-lttng-ust"
57 # oot : out-of-tree build
58 # dist: build via make dist
59 # * : normal tree build
61 # Make sure to move to the build_path and configure
67 echo "Out of tree build"
68 BUILD_PATH
=$WORKSPACE/oot
71 $WORKSPACE/configure
--prefix=$PREFIX $CONF_OPTS
74 echo "Distribution out of tree build"
75 BUILD_PATH
=`mktemp -d`
77 # Initial configure and generate tarball
82 cp *.
tar.
* $BUILD_PATH/
85 # Ignore level 1 of tar
86 tar xvf
*.
tar.
* --strip 1
88 $BUILD_PATH/configure
--prefix=$PREFIX $CONF_OPTS
92 echo "Standard tree build"
93 $WORKSPACE/configure
--prefix=$PREFIX $CONF_OPTS
105 chmod +x
$WORKSPACE/dependencies
/babeltrace
/build
/bin
/babeltrace
106 export PATH
="$PATH:$WORKSPACE/dependencies/babeltrace/build/bin"
108 rm -rf $WORKSPACE/tap
109 mkdir
-p $WORKSPACE/tap
110 mkdir
-p $WORKSPACE/tap
/unit
111 mkdir
-p $WORKSPACE/tap
/fast_regression
112 mkdir
-p $WORKSPACE/tap
/with_bindings_regression
116 if [ "$conf" = "std" ]
118 prove
--merge --exec '' - < $BUILD_PATH/tests
/unit_tests
--archive $WORKSPACE/tap
/unit
/ || true
119 prove
--merge --exec '' - < $BUILD_PATH/tests
/fast_regression
--archive $WORKSPACE/tap
/fast_regression
/ || true
122 if [ "$conf" = "no_ust" ]
124 # Regression is disabled for now, we need to adjust the testsuite for no ust builds.
125 echo "Testsuite disabled. See job configuration for more info."
128 if [ "$conf" = "python_bindings" ]
130 # Disabled due to race conditions in tests
131 echo "Testsuite disabled. See job configuration for more info."
132 prove
--merge --exec '' - < $BUILD_PATH/tests
/unit_tests
--archive $WORKSPACE/tap
/unit
/ || true
133 prove
--merge --exec '' - < $BUILD_PATH/tests
/fast_regression
--archive $WORKSPACE/tap
/fast_regression
/ || true
134 prove
--merge --exec '' - < $BUILD_PATH/tests
/with_bindings_regression
--archive $WORKSPACE/tap
/with_bindings_regression
/ || true
137 # TAP plugin is having a hard time with .yml files.
138 rm -f $WORKSPACE/tap
/unit
/meta.yml
139 rm -f $WORKSPACE/tap
/fast_regression
/meta.yml
140 rm -f $WORKSPACE/tap
/with_bindings_regression
/meta.yml
142 # And also with files without extension, so rename all result to *.tap
143 find $WORKSPACE/tap
/unit
/ -type f
-exec mv {} {}.tap \
;
144 find $WORKSPACE/tap
/fast_regression
/ -type f
-exec mv {} {}.tap \
;
145 find $WORKSPACE/tap
/with_bindings_regression
/ -type f
-exec mv {} {}.tap \
;
150 # Cleanup rpath and libtool .la files
151 find $WORKSPACE/build
/bin
-executable -type f
-exec chrpath
--delete {} \
;
152 find $WORKSPACE/build
/lib
-name "*.so" -exec chrpath
--delete {} \
;
153 find $WORKSPACE/build
/lib
-name "*.la" -exec rm -f {} \
;
155 # Clean temp dir for dist build
156 if [ $build = "dist" ]; then
This page took 0.038087 seconds and 5 git commands to generate.