jjb: lttng-modules: remove stable-2.9
[lttng-ci.git] / scripts / babeltrace / build.sh
index 744b3cf1c20133769d342bbb655875fed823e339..efc8be1b99edf55497637c770eb1ddcd60f5308c 100755 (executable)
@@ -170,6 +170,8 @@ sol11-i386)
     export TAR=gtar
     export NPROC=nproc
     export PATH="$PATH:/usr/perl5/bin"
+    export CPPFLAGS="-I/opt/csw/include"
+    export LDFLAGS="-L/opt/csw/lib -R/opt/csw/lib"
     export LD_ALTEXEC=/usr/bin/gld
     export LD=/usr/bin/gld
     export PYTHON="python3"
@@ -187,6 +189,15 @@ macosx)
     export PYTHON_CONFIG="python3-config"
     ;;
 
+cygwin)
+    export MAKE=make
+    export TAR=tar
+    export NPROC=nproc
+    export PYTHON="python3"
+    export PYTHON_CONFIG="python3-config"
+    rebase_dll=1
+    ;;
+
 *)
     export MAKE=make
     export TAR=tar
@@ -339,18 +350,28 @@ esac
 # BUILD!
 $MAKE -j "$($NPROC)" V=1
 
+# Force rebase DLL address mapping
+if [ "${rebase_dll:-}" == "1" ]; then
+       find . -name "*.dll" | xargs rebase -O -v
+fi
+
 # Install in the workspace
 $MAKE install DESTDIR="$WORKSPACE"
 
 # Run tests, don't fail now, we want to run the archiving steps
-set +e
-$MAKE --keep-going check
-ret=$?
-set -e
+failed_tests=0
+$MAKE --keep-going check || failed_tests=1
 
 # Copy tap logs for the jenkins tap parser before cleaning the build dir
 rsync -a --exclude 'test-suite.log' --include '*/' --include '*.log' --exclude='*' tests/ "$WORKSPACE/tap"
 
+# The test suite prior to 1.5 did not produce TAP logs
+if verlt "$PACKAGE_VERSION" "1.5"; then
+    mkdir -p "$WORKSPACE/tap/no-log"
+    echo "1..1" > "$WORKSPACE/tap/no-log/tests.log"
+    echo "ok 1 - Test suite doesn't support logging" >> "$WORKSPACE/tap/no-log/tests.log"
+fi
+
 # Clean the build directory
 $MAKE clean
 
@@ -361,7 +382,7 @@ find "$WORKSPACE/$PREFIX/lib" -name "*.so" -exec chrpath --delete {} \;
 # Remove libtool .la files
 find "$WORKSPACE/$PREFIX/lib" -name "*.la" -exec rm -f {} \;
 
-# Exit with the return code of the test suite
-exit $ret
+# Exit with failure if any of the tests failed
+exit $failed_tests
 
 # EOF
This page took 0.023551 seconds and 4 git commands to generate.