X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=scripts%2Flttng-tools%2Fbuild.sh;h=dded5f1efeda0b555474c8e6f92d3c6aa069103f;hb=b9b26e2dc1815a7681e8cae1278a2e5d2191f68a;hp=756b4aba0faa318f14c7e645c45af4943f1d6c5d;hpb=b3ea4ae0e1657d54ec8d18e69c2499adcb8517aa;p=lttng-ci.git diff --git a/scripts/lttng-tools/build.sh b/scripts/lttng-tools/build.sh index 756b4ab..dded5f1 100755 --- a/scripts/lttng-tools/build.sh +++ b/scripts/lttng-tools/build.sh @@ -73,6 +73,7 @@ verne() { arch=${arch:-} conf=${conf:-} build=${build:-} +test_type=${test_type:-} SRCDIR="$WORKSPACE/src/lttng-tools" #TMPDIR="$WORKSPACE/tmp" @@ -101,6 +102,8 @@ UST_JAVA="$WORKSPACE/deps/lttng-ust/build/share/java/" BABEL_LIBS="$WORKSPACE/deps/babeltrace/build/lib/" BABEL_BINS="$WORKSPACE/deps/babeltrace/build/bin/" +# pgrep +PGREP=pgrep # Set platform variables case "$arch" in @@ -110,7 +113,7 @@ sol10-i386) NPROC=gnproc BISON="bison" YACC="$BISON -y" - CFLAGS="$CFLAGS -D_XOPEN_SOURCE=500" + CFLAGS="${CFLAGS:-} -D_XOPEN_SOURCE=500" RUN_TESTS="no" export PATH="/opt/csw/bin:/usr/ccs/bin:$PATH" @@ -120,12 +123,14 @@ sol11-i386) MAKE=gmake TAR=gtar NPROC=nproc - BISON="/opt/csw/bin/bison" + BISON="bison" YACC="$BISON -y" - CFLAGS="$CFLAGS -D_XOPEN_SOURCE=500" + CFLAGS="${CFLAGS:-} -D_XOPEN_SOURCE=500" RUN_TESTS="no" export PATH="$PATH:/usr/perl5/bin" + CPPFLAGS="-I/opt/csw/include" + LDFLAGS="-L/opt/csw/lib" ;; macosx) @@ -137,7 +142,7 @@ macosx) RUN_TESTS="no" export PATH="/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" - CFLAGS="$CFLAGS -I/opt/local/include" + CPPFLAGS="-I/opt/local/include" LDFLAGS="-L/opt/local/lib" ;; @@ -171,6 +176,17 @@ cygwin|cygwin64|msys32|msys64) ;; esac +case "$test_type" in +base) + RUN_TESTS_LONG_REGRESSION="no" + ;; +full) + RUN_TESTS_LONG_REGRESSION="yes" + ;; +*) + RUN_TESTS_LONG_REGRESSION="no" + ;; +esac # Enter the source directory cd "$SRCDIR" @@ -205,17 +221,21 @@ else NO_UST="--disable-lttng-ust" fi +# Most build configs require the python bindings +CONF_OPTS="--enable-python-bindings" +export PYTHON="python3" +export PYTHON_CONFIG="/usr/bin/python3-config" + # Set configure options for each build configuration -CONF_OPTS="" case "$conf" in static) echo "Static build" - CONF_OPTS="--enable-static --disable-shared" + CONF_OPTS+=" --enable-static --disable-shared" ;; no-ust) echo "Build without UST support" - CONF_OPTS="$NO_UST" + CONF_OPTS+=" $NO_UST" ;; agents) @@ -227,12 +247,6 @@ agents) echo "Enable Python agents" export PYTHONPATH="$UST_PYTHON2:$UST_PYTHON3" CONF_OPTS+=" --enable-test-python-agent-all" - - echo "Enable Python bindings" - # We only support bindings built with Python 3 - export PYTHON="python3" - export PYTHON_CONFIG="/usr/bin/python3-config" - CONF_OPTS+=" --enable-python-bindings" ;; relayd-only) @@ -247,7 +261,6 @@ debug-rcu) *) echo "Standard build" - CONF_OPTS="" ;; esac @@ -338,6 +351,9 @@ if [ "$RUN_TESTS" = "yes" ]; then mkdir -p "$TAPDIR/unit" mkdir -p "$TAPDIR/fast_regression" mkdir -p "$TAPDIR/with_bindings_regression" + if [ "$RUN_TESTS_LONG_REGRESSION" = "yes" ]; then + mkdir -p "$TAPDIR/long_regression" + fi # Force the lttng-sessiond path to /bin/true to prevent the spawing of a # lttng-sessiond --daemonize on "lttng create" @@ -352,17 +368,16 @@ if [ "$RUN_TESTS" = "yes" ]; then else prove --merge -v --exec '' - < "$BUILD_PATH/tests/unit_tests" --archive "$TAPDIR/unit/" || true prove --merge -v --exec '' - < "$BUILD_PATH/tests/fast_regression" --archive "$TAPDIR/fast_regression/" || true + prove --merge -v --exec '' - < "$BUILD_PATH/tests/with_bindings_regression" --archive "$TAPDIR/with_bindings_regression/" || true + fi + if [ "$RUN_TESTS_LONG_REGRESSION" = "yes" ]; then + prove --merge -v --exec '' - < "$BUILD_PATH/tests/long_regression" --archive "$TAPDIR/long_regression/" || true fi else # Regression is disabled for now, we need to adjust the testsuite for no ust builds. echo "Tests disabled for 'no-ust'." fi - # Run 'with_bindings_regression' test suite for 'python-bindings' config - if [ "$conf" = "python-bindings" ]; then - prove --merge -v --exec '' - < "$BUILD_PATH/tests/with_bindings_regression" --archive "$TAPDIR/with_bindings_regression/" || true - fi - # TAP plugin is having a hard time with .yml files. find "$TAPDIR" -name "meta.yml" -exec rm -f {} \;