3 # Create build directory
4 rm -rf $WORKSPACE/build
5 mkdir
-p $WORKSPACE/build
8 URCU_INCS
="$WORKSPACE/dependencies/liburcu/build/include/"
9 URCU_LIBS
="$WORKSPACE/dependencies/liburcu/build/lib/"
12 UST_INCS
="$WORKSPACE/dependencies/lttng-ust/build/include/"
13 UST_LIBS
="$WORKSPACE/dependencies/lttng-ust/build/lib/"
14 UST_PREFIX
="$WORKSPACE/dependencies/lttng-ust/build/"
17 BABEL_INCS
="$WORKSPACE/dependencies/babeltrace/build/include/"
18 BABEL_LIBS
="$WORKSPACE/dependencies/babeltrace/build/lib/"
20 PREFIX
="$WORKSPACE/build"
23 if [ "$conf" = "no_ust" ]
25 export CPPFLAGS
="-I$URCU_INCS"
26 export LDFLAGS
="-L$URCU_LIBS"
27 export LD_LIBRARY_PATH
="$URCU_LIBS:$BABEL_LIBS:$LD_LIBRARY_PATH"
29 CONF_OPTS
+=" --with-lttng-ust-prefix=$UST_PREFIX"
30 export CPPFLAGS
="-I$URCU_INCS"
31 export LDFLAGS
="-L$URCU_LIBS"
32 export LD_LIBRARY_PATH
="$URCU_LIBS:$BABEL_LIBS:$LD_LIBRARY_PATH"
38 # Currently disabled, ust doesn't seem to be built right for static linking.
41 # CONF_OPTS="--enable-static --disable-shared"
44 echo "Build with python bindings"
45 # We only support bindings built with Python 3
46 export PYTHON
="python3"
47 export PYTHON_CONFIG
="/usr/bin/python3-config"
48 CONF_OPTS
+=" --enable-python-bindings"
51 echo "Build without UST support"
52 CONF_OPTS
+=" --disable-lttng-ust"
55 echo "Build with java-jul UST support"
56 CONF_OPTS
+=" --enable-java-agent-tests-jul --with-java-classpath=$UST_PREFIX/share/java/\*"
59 echo "Build with java-log4j UST support"
60 CONF_OPTS
+=" --enable-java-agent-tests-log4j --with-java-classpath=/usr/share/java/log4j-1.2.jar"
69 # oot : out-of-tree build
70 # dist: build via make dist
71 # * : normal tree build
73 # Make sure to move to the build_path and configure
75 echo "**************************************************"
77 echo "**************************************************"
82 echo "Out of tree build"
83 BUILD_PATH
=$WORKSPACE/oot
86 $WORKSPACE/configure
--prefix=$PREFIX $CONF_OPTS
89 echo "Distribution out of tree build"
90 BUILD_PATH
=`mktemp -d`
92 # Initial configure and generate tarball
93 .
/configure
$CONF_OPTS
97 cp *.
tar.
* $BUILD_PATH/
100 # Ignore level 1 of tar
101 tar xvf
*.
tar.
* --strip 1
103 $BUILD_PATH/configure
--prefix=$PREFIX $CONF_OPTS
106 BUILD_PATH
=$WORKSPACE
107 echo "Standard tree build"
108 $WORKSPACE/configure
--prefix=$PREFIX $CONF_OPTS
120 chmod +x
$WORKSPACE/dependencies
/babeltrace
/build
/bin
/babeltrace
121 export PATH
="$PATH:$WORKSPACE/dependencies/babeltrace/build/bin"
123 rm -rf $WORKSPACE/tap
124 mkdir
-p $WORKSPACE/tap
125 mkdir
-p $WORKSPACE/tap
/unit
126 mkdir
-p $WORKSPACE/tap
/fast_regression
127 mkdir
-p $WORKSPACE/tap
/with_bindings_regression
131 if [ "$conf" = "std" ]
133 prove
--merge --exec '' - < $BUILD_PATH/tests
/unit_tests
--archive $WORKSPACE/tap
/unit
/ || true
134 prove
--merge --exec '' - < $BUILD_PATH/tests
/fast_regression
--archive $WORKSPACE/tap
/fast_regression
/ || true
137 if [ "$conf" = "java_jul" ]
139 prove
--merge --exec '' - < $BUILD_PATH/tests
/unit_tests
--archive $WORKSPACE/tap
/unit
/ || true
140 prove
--merge --exec '' - < $BUILD_PATH/tests
/fast_regression
--archive $WORKSPACE/tap
/fast_regression
/ || true
143 if [ "$conf" = "no_ust" ]
145 # Regression is disabled for now, we need to adjust the testsuite for no ust builds.
146 echo "Testsuite disabled. See job configuration for more info."
149 if [ "$conf" = "python_bindings" ]
151 # Disabled due to race conditions in tests
152 echo "Testsuite disabled. See job configuration for more info."
153 prove
--merge --exec '' - < $BUILD_PATH/tests
/unit_tests
--archive $WORKSPACE/tap
/unit
/ || true
154 prove
--merge --exec '' - < $BUILD_PATH/tests
/fast_regression
--archive $WORKSPACE/tap
/fast_regression
/ || true
155 prove
--merge --exec '' - < $BUILD_PATH/tests
/with_bindings_regression
--archive $WORKSPACE/tap
/with_bindings_regression
/ || true
158 # TAP plugin is having a hard time with .yml files.
159 rm -f $WORKSPACE/tap
/unit
/meta.yml
160 rm -f $WORKSPACE/tap
/fast_regression
/meta.yml
161 rm -f $WORKSPACE/tap
/with_bindings_regression
/meta.yml
163 # And also with files without extension, so rename all result to *.tap
164 find $WORKSPACE/tap
/unit
/ -type f
-exec mv {} {}.tap \
;
165 find $WORKSPACE/tap
/fast_regression
/ -type f
-exec mv {} {}.tap \
;
166 find $WORKSPACE/tap
/with_bindings_regression
/ -type f
-exec mv {} {}.tap \
;
171 # Cleanup rpath and libtool .la files
172 find $WORKSPACE/build
/bin
-executable -type f
-exec chrpath
--delete {} \
;
173 find $WORKSPACE/build
/lib
-name "*.so" -exec chrpath
--delete {} \
;
174 find $WORKSPACE/build
/lib
-name "*.la" -exec rm -f {} \
;
176 # Clean temp dir for dist build
177 if [ $build = "dist" ]; then
This page took 0.036057 seconds and 5 git commands to generate.