From 87e41bca43a0628c7088f2647ebebd41f0ef98cd Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Thu, 22 Oct 2015 17:13:25 -0400 Subject: [PATCH] Add babeltrace Solaris build jobs Signed-off-by: Michael Jeanson --- jobs/babeltrace.yaml | 15 +++++--- scripts/babeltrace/build.sh | 71 +++++++++++++++++++++---------------- 2 files changed, 51 insertions(+), 35 deletions(-) diff --git a/jobs/babeltrace.yaml b/jobs/babeltrace.yaml index 26e3b01..1f56f9a 100644 --- a/jobs/babeltrace.yaml +++ b/jobs/babeltrace.yaml @@ -58,10 +58,7 @@ - axis: type: user-defined name: conf - values: - - std - - static - - python-bindings + values: '{obj:conf}' - axis: type: user-defined name: build @@ -215,10 +212,20 @@ buildtype: build arch: !!python/tuple [x86-32, x86-64] build: !!python/tuple [std, oot, dist] + conf: !!python/tuple [std, static, python-bindings] - 'babeltrace_{version}_{buildtype}': buildtype: portbuild arch: !!python/tuple [armhf, powerpc, ppc64el] build: !!python/tuple [std] + conf: !!python/tuple [std, static, python-bindings] + - 'babeltrace_{version}_{buildtype}': + buildtype: solarisbuild + arch: !!python/tuple [solaris10, solaris11] + build: !!python/tuple [std] + conf: !!python/tuple [std, static] + version: + - stable-1.3 + - master - 'babeltrace_{version}_cppcheck' - 'babeltrace_{version}_scan-build' - 'babeltrace_{version}_pylint' diff --git a/scripts/babeltrace/build.sh b/scripts/babeltrace/build.sh index 3af49df..4aa0cb6 100755 --- a/scripts/babeltrace/build.sh +++ b/scripts/babeltrace/build.sh @@ -25,6 +25,31 @@ PREFIX="$WORKSPACE/build" CONF_OPTS="" +case "$arch" in +solaris10) + MAKE=gmake + TAR=gtar + NPROC=gnproc + BISON=bison + YACC="$BISON -y" + ;; +solaris11) + MAKE=gmake + TAR=gtar + NPROC=nproc + BISON="/opt/csw/bin/bison" + YACC="$BISON -y" + export PATH="$PATH:/usr/perl5/bin" + ;; +*) + MAKE=make + TAR=tar + NPROC=nproc + BISON=bison + YACC="$BISON -y" + ;; +esac + case "$conf" in static) echo "Static build" @@ -60,63 +85,47 @@ case "$build" in BUILD_PATH=$WORKSPACE/oot mkdir -p $BUILD_PATH cd $BUILD_PATH - $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS + MAKE=$MAKE BISON="$BISON" YACC="$YACC" $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS ;; dist) echo "Distribution out of tree build" BUILD_PATH=`mktemp -d` # Initial configure and generate tarball - ./configure - make dist + MAKE=$MAKE BISON="$BISON" YACC="$YACC" ./configure + $MAKE dist mkdir -p $BUILD_PATH cp *.tar.* $BUILD_PATH/ cd $BUILD_PATH # Ignore level 1 of tar - tar xvf *.tar.* --strip 1 + $TAR xvf *.tar.* --strip 1 - $BUILD_PATH/configure --prefix=$PREFIX $CONF_OPTS + MAKE=$MAKE BISON="$BISON" YACC="$YACC" $BUILD_PATH/configure --prefix=$PREFIX $CONF_OPTS # Set test plan to dist tar TEST_PLAN_PATH=$BUILD_PATH ;; *) echo "Standard tree build" - $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS + MAKE=$MAKE BISON="$BISON" YACC="$YACC" $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS ;; esac -make -make install - -rm -rf $WORKSPACE/tap -mkdir -p $WORKSPACE/tap - -cd $BUILD_PATH/tests - -# Run make check tests -if [ -e $TEST_PLAN_PATH/tests/tests ]; then - prove --merge --exec '' - < $TEST_PLAN_PATH/tests/tests --archive $WORKSPACE/tap/ || true -else - echo "Missing test plan" - exit 1 -fi - -# TAP plugin is having a hard time with .yml files. -rm -f $WORKSPACE/tap/meta.yml - -# And also with files without extension, so rename all result to *.tap -find $WORKSPACE/tap/ -type f -exec mv {} {}.tap \; - -make clean +$MAKE -j `$NPROC` +$MAKE install +$MAKE check +$MAKE clean # Cleanup rpath and libtool .la files -find $WORKSPACE/build/bin -executable -type f -exec chrpath --delete {} \; +#find $WORKSPACE/build/bin -executable -type f -exec chrpath --delete {} \; find $WORKSPACE/build/lib -name "*.so" -exec chrpath --delete {} \; find $WORKSPACE/build/lib -name "*.la" -exec rm -f {} \; if [ $build = "dist" ]; then - rm -rf $BUILD_PATH + cd $WORKSPACE + rm -rf $BUILD_PATH fi + +# EOF -- 2.34.1