Commit | Line | Data |
---|---|---|
b3fc12e8 MJ |
1 | #!/bin/bash -exu |
2 | # | |
3 | # Copyright (C) 2015, Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com> | |
4 | # 2016, Michael Jeanson <mjeanson@efficios.com> | |
5 | # | |
6 | # This program is free software: you can redistribute it and/or modify | |
7 | # it under the terms of the GNU General Public License as published by | |
8 | # the Free Software Foundation, either version 3 of the License, or | |
9 | # (at your option) any later version. | |
10 | # | |
11 | # This program is distributed in the hope that it will be useful, | |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU General Public License for more details. | |
15 | # | |
16 | # You should have received a copy of the GNU General Public License | |
17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | ||
19 | SRCDIR="$WORKSPACE/src/$PROJECT_NAME" | |
20 | ||
21 | # Create build directory | |
22 | rm -rf "$WORKSPACE/build" | |
23 | mkdir -p "$WORKSPACE/build" | |
24 | ||
25 | PYTHON3=python3 | |
26 | P3_VERSION=$($PYTHON3 -c "import sys;print(sys.version[:3])") | |
27 | ||
28 | # liburcu | |
29 | URCU_INCS="$WORKSPACE/deps/liburcu/build/include/" | |
30 | URCU_LIBS="$WORKSPACE/deps/liburcu/build/lib/" | |
31 | ||
32 | # lttng-ust | |
33 | UST_INCS="$WORKSPACE/deps/lttng-ust/build/include/" | |
34 | UST_LIBS="$WORKSPACE/deps/lttng-ust/build/lib/" | |
35 | UST_BINS="$WORKSPACE/deps/lttng-ust/build/bin/" | |
36 | ||
37 | # babeltrace | |
38 | BABEL_INCS="$WORKSPACE/deps/babeltrace/build/include/" | |
39 | BABEL_LIBS="$WORKSPACE/deps/babeltrace/build/lib/" | |
40 | BABEL_PY="$WORKSPACE/deps/babeltrace/build/lib/python$P3_VERSION/site-packages/" | |
41 | ||
42 | # lttng-tools | |
43 | TOOLS_INCS="$WORKSPACE/deps/lttng-tools/build/include/" | |
44 | TOOLS_LIBS="$WORKSPACE/deps/lttng-tools/build/lib/" | |
45 | TOOLS_BINS="$WORKSPACE/deps/lttng-tools/build/bin/" | |
46 | TOOLS_PY="$WORKSPACE/deps/lttng-tools/build/lib/python$P3_VERSION/site-packages/" | |
47 | ||
48 | rm -rf "$WORKSPACE/deps/lttng-modules" | |
49 | git clone git://github.com/lttng/lttng-modules.git "$WORKSPACE/deps/lttng-modules" | |
50 | ||
51 | export CFLAGS="-I$URCU_INCS -I$UST_INCS" | |
52 | export LDFLAGS="-L$URCU_LIBS -L$UST_LIBS" | |
53 | export LD_LIBRARY_PATH="$URCU_LIBS:$UST_LIBS:$BABEL_LIBS:$TOOLS_LIBS:${LD_LIBRARY_PATH:-}" | |
54 | export PYTHONPATH="$TOOLS_PY:$BABEL_PY:${PYTHONPATH:-}" | |
55 | export PATH="$TOOLS_BINS:$UST_BINS:$PATH" | |
56 | export LTTNG_MODULES_DIR="$WORKSPACE/deps/lttng-modules/" | |
57 | ||
58 | export LTTNG_SESSION_CONFIG_XSD_PATH="$WORKSPACE/deps/lttng-tools/build/share/xml/lttng" | |
59 | export LTTNG_CONSUMERD64_BIN="$WORKSPACE/deps/lttng-tools/build/lib/lttng/libexec/lttng-consumerd" | |
60 | ||
61 | cd "$SRCDIR" | |
62 | ||
63 | make | |
64 | ||
65 | ./benchmarks.py | |
66 | ||
67 | # EOF |