f591c3646009e6c8f8a712c00dee6408ca3bcee1
[lttng-ci.git] / lttng-ust / lttng-ust-master.sh
1 # Create build directory
2 rm -rf $WORKSPACE/build
3 mkdir -p $WORKSPACE/build
4
5 # liburcu
6 URCU_INCS="$WORKSPACE/dependencies/liburcu/build/include/"
7 URCU_LIBS="$WORKSPACE/dependencies/liburcu/build/lib/"
8
9 export CPPFLAGS="-I$URCU_INCS"
10 export LDFLAGS="-L$URCU_LIBS"
11 export LD_LIBRARY_PATH="$URCU_LIBS:$LD_LIBRARY_PATH"
12
13 PREFIX="$WORKSPACE/build"
14
15 ./bootstrap
16
17 CONF_OPTS=""
18
19 case "$conf" in
20 # Unsupported! liblttng-ust can't pull in it's static (.a) dependencies.
21 #static)
22 # echo "Static build"
23 # CONF_OPTS="--enable-static --disable-shared"
24 # ;;
25 java-agent)
26 echo "Java agent build"
27 export CLASSPATH="/usr/share/java/log4j-1.2.jar"
28 CONF_OPTS="--enable-java-agent-all"
29 ;;
30 python-agent)
31 echo "Python agent build"
32 CONF_OPTS="--enable-python-agent"
33 *)
34 echo "Standard build"
35 CONF_OPTS=""
36 ;;
37 esac
38
39 BUILD_PATH=$WORKSPACE
40 # Build type
41 # oot : out-of-tree build
42 # dist: build via make dist
43 # * : normal tree build
44 case "$build" in
45 oot)
46 BUILD_PATH=$WORKSPACE/oot
47 mkdir -p $BUILD_PATH
48 cd $BUILD_PATH
49 ;;
50 dist)
51 ;;
52 *)
53 ;;
54 esac
55
56 $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS
57 make V=1
58 make install
59
60 # Run tests
61 rm -rf $WORKSPACE/tap
62 mkdir -p $WORKSPACE/tap/unit
63
64 cd $WORKSPACE/tests
65
66 prove --merge --exec '' - < $BUILD_PATH/tests/unit_tests --archive $WORKSPACE/tap/unit/ || true
67
68 # TAP plugin is having a hard time with .yml files.
69 rm -f $WORKSPACE/tap/unit/meta.yml
70
71 # And also with files without extension, so rename all result to *.tap
72 find $WORKSPACE/tap/unit/ -type f -exec mv {} {}.tap \;
73
74 # Cleanup
75 make clean
76
77 # Cleanup rpath and libtool .la files
78 find $WORKSPACE/build/lib -name "*.so" -exec chrpath --delete {} \;
79 find $WORKSPACE/build/lib -name "*.la" -exec rm -f {} \;
This page took 0.030704 seconds and 3 git commands to generate.