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"
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"
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/*"
65 # oot : out-of-tree build
66 # dist: build via make dist
67 # * : normal tree build
69 # Make sure to move to the build_path and configure
75 echo "Out of tree build"
76 BUILD_PATH
=$WORKSPACE/oot
79 $WORKSPACE/configure
--prefix=$PREFIX $CONF_OPTS
82 echo "Distribution out of tree build"
83 BUILD_PATH
=`mktemp -d`
85 # Initial configure and generate tarball
90 cp *.
tar.
* $BUILD_PATH/
93 # Ignore level 1 of tar
94 tar xvf
*.
tar.
* --strip 1
96 $BUILD_PATH/configure
--prefix=$PREFIX $CONF_OPTS
100 echo "Standard tree build"
101 $WORKSPACE/configure
--prefix=$PREFIX $CONF_OPTS
113 chmod +x
$WORKSPACE/dependencies
/babeltrace
/build
/bin
/babeltrace
114 export PATH
="$PATH:$WORKSPACE/dependencies/babeltrace/build/bin"
116 rm -rf $WORKSPACE/tap
117 mkdir
-p $WORKSPACE/tap
118 mkdir
-p $WORKSPACE/tap
/unit
119 mkdir
-p $WORKSPACE/tap
/fast_regression
120 mkdir
-p $WORKSPACE/tap
/with_bindings_regression
124 if [ "$conf" = "std" ]
126 prove
--merge --exec '' - < $BUILD_PATH/tests
/unit_tests
--archive $WORKSPACE/tap
/unit
/ || true
127 prove
--merge --exec '' - < $BUILD_PATH/tests
/fast_regression
--archive $WORKSPACE/tap
/fast_regression
/ || true
130 if [ "$conf" = "java_jul" ]
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" = "no_ust" ]
138 # Regression is disabled for now, we need to adjust the testsuite for no ust builds.
139 echo "Testsuite disabled. See job configuration for more info."
142 if [ "$conf" = "python_bindings" ]
144 # Disabled due to race conditions in tests
145 echo "Testsuite disabled. See job configuration for more info."
146 prove
--merge --exec '' - < $BUILD_PATH/tests
/unit_tests
--archive $WORKSPACE/tap
/unit
/ || true
147 prove
--merge --exec '' - < $BUILD_PATH/tests
/fast_regression
--archive $WORKSPACE/tap
/fast_regression
/ || true
148 prove
--merge --exec '' - < $BUILD_PATH/tests
/with_bindings_regression
--archive $WORKSPACE/tap
/with_bindings_regression
/ || true
151 # TAP plugin is having a hard time with .yml files.
152 rm -f $WORKSPACE/tap
/unit
/meta.yml
153 rm -f $WORKSPACE/tap
/fast_regression
/meta.yml
154 rm -f $WORKSPACE/tap
/with_bindings_regression
/meta.yml
156 # And also with files without extension, so rename all result to *.tap
157 find $WORKSPACE/tap
/unit
/ -type f
-exec mv {} {}.tap \
;
158 find $WORKSPACE/tap
/fast_regression
/ -type f
-exec mv {} {}.tap \
;
159 find $WORKSPACE/tap
/with_bindings_regression
/ -type f
-exec mv {} {}.tap \
;
164 # Cleanup rpath and libtool .la files
165 find $WORKSPACE/build
/bin
-executable -type f
-exec chrpath
--delete {} \
;
166 find $WORKSPACE/build
/lib
-name "*.so" -exec chrpath
--delete {} \
;
167 find $WORKSPACE/build
/lib
-name "*.la" -exec rm -f {} \
;
169 # Clean temp dir for dist build
170 if [ $build = "dist" ]; then
This page took 0.035842 seconds and 5 git commands to generate.