jjb: archive top-level test suite log
[lttng-ci.git] / scripts / lttng-tools / build.sh
index 577b835bc55261bd7284434491399fb92f66255d..fb9703f5e65fed2c5060034b81da42a138b8def6 100755 (executable)
@@ -115,13 +115,15 @@ SRCDIR="$WORKSPACE/src/lttng-tools"
 TAPDIR="$WORKSPACE/tap"
 PREFIX="/build"
 LIBDIR="lib"
+LIBDIR_ARCH="$LIBDIR"
 
 # RHEL and SLES both use lib64 but don't bother shipping a default autoconf
 # site config that matches this.
-if [[ ( -f /etc/redhat-release || -f /etc/SuSE-release ) && ( "$(uname -m)" == "x86_64" ) ]]; then
-    LIBDIR_ARCH="${LIBDIR}64"
-else
-    LIBDIR_ARCH="$LIBDIR"
+if [[ ( -f /etc/redhat-release || -f /etc/SuSE-release || -f /etc/yocto-release ) ]]; then
+    # Detect the userspace bitness in a distro agnostic way
+    if file -L /bin/bash | grep '64-bit' >/dev/null 2>&1; then
+        LIBDIR_ARCH="${LIBDIR}64"
+    fi
 fi
 
 DEPS_INC="$WORKSPACE/deps/build/include"
@@ -280,8 +282,8 @@ cygwin|cygwin64|msys32|msys64)
 esac
 
 # The missing-field-initializers warning code is very dumb in GCC 4.8 on
-# SLES12, disable it even if it's available.
-if [[ $platform = sles12sp5* ]]; then
+# SLES12 / EL7, disable it even if it's available.
+if [[ $platform = sles12sp5* ]] || [[  $platform = el7* ]]; then
     CFLAGS="$CFLAGS -Wno-missing-field-initializers"
     CXXFLAGS="$CXXFLAGS -Wno-missing-field-initializers"
 fi
@@ -373,6 +375,11 @@ debug-rcu)
 
 *)
     echo "Standard configuration"
+
+    # Something is broken in docbook-xml on yocto
+    if [[ "$platform" = yocto* ]]; then
+        CONF_OPTS+=("--disable-man-pages")
+    fi
     ;;
 esac
 
@@ -489,7 +496,12 @@ if [ "$LTTNG_TOOLS_RUN_TESTS" = "yes" ] && [ "$conf" != "no-ust" ]; then
         fi
 
         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/ "$TAPDIR"
+
+        # Copy the test suites top-level log which includes all tests failures
+        rsync -a --include 'test-suite.log' --include '*/' --exclude='*' tests/ "$WORKSPACE/log"
     else
         cd tests
         mkdir -p "$TAPDIR/unit"
This page took 0.023967 seconds and 4 git commands to generate.