231d32bf5af124f35d3ec1ba72502b4e061efa82
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/"
12 UST_PREFIX
=$WORKSPACE"/dependencies/lttng-ust/build/"
15 BABEL_INCS
="$WORKSPACE/dependencies/babeltrace/build/include/"
16 BABEL_LIBS
="$WORKSPACE/dependencies/babeltrace/build/lib/"
18 PREFIX
="$WORKSPACE/build"
21 if [ "$conf" = "no_ust" ]
23 export CPPFLAGS
="-I$URCU_INCS"
24 export LDFLAGS
="-L$URCU_LIBS"
25 export LD_LIBRARY_PATH
="$URCU_LIBS:$BABEL_LIBS:$LD_LIBRARY_PATH"
27 CONF_OPTS
=$CONF_OPTS" --with-lttng-ust-prefix="$UST_PREFIX
28 export CPPFLAGS
="-I$URCU_INCS"
29 export LDFLAGS
="-L$URCU_LIBS"
30 export LD_LIBRARY_PATH
="$URCU_LIBS:$BABEL_LIBS:$LD_LIBRARY_PATH"
36 # Currently disabled, ust doesn't seem to be built right for static linking.
39 # CONF_OPTS="--enable-static --disable-shared"
42 echo "Build with python bindings"
43 # We only support bindings built with Python 3
44 export PYTHON
="python3"
45 export PYTHON_CONFIG
="/usr/bin/python3-config"
46 CONF_OPTS
="--enable-python-bindings"
49 echo "Build without UST support"
50 CONF_OPTS
="--disable-lttng-ust"
53 echo "Build with java-jul UST support"
54 CONF_OPTS
=$CONF_OPTS" --enable-java-agent-tests-jul --with-java-classpath=$UST_PREFIX/share/java/\*"
57 echo "Build with java-log4j UST support"
58 CONF_OPTS
=$CONF_OPTS" --enable-java-agent-tests-log4j --with-java-classpath=/usr/share/java/log4j-1.2.jar"
67 # oot : out-of-tree build
68 # dist: build via make dist
69 # * : normal tree build
71 # Make sure to move to the build_path and configure
73 echo **************************************************
75 echo **************************************************
80 echo "Out of tree build"
81 BUILD_PATH
=$WORKSPACE/oot
84 $WORKSPACE/configure
--prefix=$PREFIX $CONF_OPTS
87 echo "Distribution out of tree build"
88 BUILD_PATH
=`mktemp -d`
90 # Initial configure and generate tarball
91 .
/configure
$CONF_OPTS
95 cp *.
tar.
* $BUILD_PATH/
98 # Ignore level 1 of tar
99 tar xvf
*.
tar.
* --strip 1
101 $BUILD_PATH/configure
--prefix=$PREFIX $CONF_OPTS
104 BUILD_PATH
=$WORKSPACE
105 echo "Standard tree build"
106 $WORKSPACE/configure
--prefix=$PREFIX $CONF_OPTS
118 chmod +x
$WORKSPACE/dependencies
/babeltrace
/build
/bin
/babeltrace
119 export PATH
="$PATH:$WORKSPACE/dependencies/babeltrace/build/bin"
121 rm -rf $WORKSPACE/tap
122 mkdir
-p $WORKSPACE/tap
123 mkdir
-p $WORKSPACE/tap
/unit
124 mkdir
-p $WORKSPACE/tap
/fast_regression
125 mkdir
-p $WORKSPACE/tap
/with_bindings_regression
129 if [ "$conf" = "std" ]
131 prove
--merge --exec '' - < $BUILD_PATH/tests
/unit_tests
--archive $WORKSPACE/tap
/unit
/ || true
132 prove
--merge --exec '' - < $BUILD_PATH/tests
/fast_regression
--archive $WORKSPACE/tap
/fast_regression
/ || true
135 if [ "$conf" = "java_jul" ]
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.034783 seconds and 4 git commands to generate.