2 # Create build directory
3 rm -rf $WORKSPACE/build
4 mkdir
-p $WORKSPACE/build
7 URCU_INCS
="$WORKSPACE/dependencies/liburcu/build/include/"
8 URCU_LIBS
="$WORKSPACE/dependencies/liburcu/build/lib/"
11 UST_INCS
="$WORKSPACE/dependencies/lttng-ust/build/include/"
12 UST_LIBS
="$WORKSPACE/dependencies/lttng-ust/build/lib/"
13 UST_PREFIX
="$WORKSPACE/dependencies/lttng-ust/build/"
16 BABEL_INCS
="$WORKSPACE/dependencies/babeltrace/build/include/"
17 BABEL_LIBS
="$WORKSPACE/dependencies/babeltrace/build/lib/"
19 PREFIX
="$WORKSPACE/build"
22 if [ "$conf" = "no_ust" ]
24 export CPPFLAGS
="-I$URCU_INCS"
25 export LDFLAGS
="-L$URCU_LIBS"
26 export LD_LIBRARY_PATH
="$URCU_LIBS:$BABEL_LIBS:$LD_LIBRARY_PATH"
28 CONF_OPTS
+=" --with-lttng-ust-prefix="$UST_PREFIX
29 export CPPFLAGS
="-I$URCU_INCS"
30 export LDFLAGS
="-L$URCU_LIBS"
31 export LD_LIBRARY_PATH
="$URCU_LIBS:$BABEL_LIBS:$LD_LIBRARY_PATH"
37 # Currently disabled, ust doesn't seem to be built right for static linking.
40 # CONF_OPTS="--enable-static --disable-shared"
43 echo "Build with python bindings"
44 # We only support bindings built with Python 3
45 export PYTHON
="python3"
46 export PYTHON_CONFIG
="/usr/bin/python3-config"
47 CONF_OPTS
+=" --enable-python-bindings"
50 echo "Build without UST support"
51 CONF_OPTS
+=" --disable-lttng-ust"
54 echo "Build with java-jul UST support"
55 CONF_OPTS
+=" --enable-java-agent-tests-jul --with-java-classpath=$UST_PREFIX/share/java/\*"
58 echo "Build with java-log4j UST support"
59 CONF_OPTS
+=" --enable-java-agent-tests-log4j --with-java-classpath=/usr/share/java/log4j-1.2.jar"
68 # oot : out-of-tree build
69 # dist: build via make dist
70 # * : normal tree build
72 # Make sure to move to the build_path and configure
74 echo "**************************************************"
76 echo "**************************************************"
81 echo "Out of tree build"
82 BUILD_PATH
=$WORKSPACE/oot
85 $WORKSPACE/configure
--prefix=$PREFIX $CONF_OPTS
88 echo "Distribution out of tree build"
89 BUILD_PATH
=`mktemp -d`
91 # Initial configure and generate tarball
92 .
/configure
$CONF_OPTS
96 cp *.
tar.
* $BUILD_PATH/
99 # Ignore level 1 of tar
100 tar xvf
*.
tar.
* --strip 1
102 $BUILD_PATH/configure
--prefix=$PREFIX $CONF_OPTS
105 BUILD_PATH
=$WORKSPACE
106 echo "Standard tree build"
107 $WORKSPACE/configure
--prefix=$PREFIX $CONF_OPTS
119 chmod +x
$WORKSPACE/dependencies
/babeltrace
/build
/bin
/babeltrace
120 export PATH
="$PATH:$WORKSPACE/dependencies/babeltrace/build/bin"
122 rm -rf $WORKSPACE/tap
123 mkdir
-p $WORKSPACE/tap
124 mkdir
-p $WORKSPACE/tap
/unit
125 mkdir
-p $WORKSPACE/tap
/fast_regression
126 mkdir
-p $WORKSPACE/tap
/with_bindings_regression
130 if [ "$conf" = "std" ]
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
136 if [ "$conf" = "java_jul" ]
138 prove
--merge --exec '' - < $BUILD_PATH/tests
/unit_tests
--archive $WORKSPACE/tap
/unit
/ || true
139 prove
--merge --exec '' - < $BUILD_PATH/tests
/fast_regression
--archive $WORKSPACE/tap
/fast_regression
/ || true
142 if [ "$conf" = "no_ust" ]
144 # Regression is disabled for now, we need to adjust the testsuite for no ust builds.
145 echo "Testsuite disabled. See job configuration for more info."
148 if [ "$conf" = "python_bindings" ]
150 # Disabled due to race conditions in tests
151 echo "Testsuite disabled. See job configuration for more info."
152 prove
--merge --exec '' - < $BUILD_PATH/tests
/unit_tests
--archive $WORKSPACE/tap
/unit
/ || true
153 prove
--merge --exec '' - < $BUILD_PATH/tests
/fast_regression
--archive $WORKSPACE/tap
/fast_regression
/ || true
154 prove
--merge --exec '' - < $BUILD_PATH/tests
/with_bindings_regression
--archive $WORKSPACE/tap
/with_bindings_regression
/ || true
157 # TAP plugin is having a hard time with .yml files.
158 rm -f $WORKSPACE/tap
/unit
/meta.yml
159 rm -f $WORKSPACE/tap
/fast_regression
/meta.yml
160 rm -f $WORKSPACE/tap
/with_bindings_regression
/meta.yml
162 # And also with files without extension, so rename all result to *.tap
163 find $WORKSPACE/tap
/unit
/ -type f
-exec mv {} {}.tap \
;
164 find $WORKSPACE/tap
/fast_regression
/ -type f
-exec mv {} {}.tap \
;
165 find $WORKSPACE/tap
/with_bindings_regression
/ -type f
-exec mv {} {}.tap \
;
170 # Cleanup rpath and libtool .la files
171 find $WORKSPACE/build
/bin
-executable -type f
-exec chrpath
--delete {} \
;
172 find $WORKSPACE/build
/lib
-name "*.so" -exec chrpath
--delete {} \
;
173 find $WORKSPACE/build
/lib
-name "*.la" -exec rm -f {} \
;
175 # Clean temp dir for dist build
176 if [ $build = "dist" ]; then
This page took 0.035253 seconds and 5 git commands to generate.