diff --git a/tests/CI/README b/tests/CI/README new file mode 100644 index 000000000..e21b79a99 --- /dev/null +++ b/tests/CI/README @@ -0,0 +1,6 @@ +This directory contains scripts and other files +related to the various Continous Integration +environments. + +Note: for historical reasons, travis support is +currently under ./tests/travis diff --git a/tests/CI/clang-check-sanitizer.sh b/tests/CI/clang-check-sanitizer.sh new file mode 100755 index 000000000..96398a304 --- /dev/null +++ b/tests/CI/clang-check-sanitizer.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -e +set -v + +export CC=clang #gcc # clang --> package currently broken in fedora 23 +export CFLAGS="-g" # -fsanitize=address" +export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" +autoreconf -fiv +./configure --prefix=/usr/local --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/rsyslog --disable-generate-man-pages --enable-testbench --enable-imdiag --enable-imfile --enable-impstats --enable-imptcp --enable-mmanon --enable-mmaudit --enable-mmfields --enable-mmjsonparse --enable-mmpstrucdata --enable-mmsequence --enable-mmutf8fix --enable-mail --enable-omprog --enable-omruleset --enable-omstdout --enable-omuxsock --enable-pmaixforwardedfrom --enable-pmciscoios --enable-pmcisconames --enable-pmlastmsg --enable-pmsnare --enable-libgcrypt --enable-mmnormalize --disable-omudpspoof --enable-relp --disable-snmp --disable-mmsnmptrapd --enable-gnutls --enable-usertools=no --enable-mysql --enable-valgrind --enable-omjournal +make clean +make check diff --git a/tests/CI/try_merge.sh b/tests/CI/try_merge.sh new file mode 100755 index 000000000..7cd410065 --- /dev/null +++ b/tests/CI/try_merge.sh @@ -0,0 +1,34 @@ +#!/bin/bash +oldbranch=`git rev-parse --abbrev-ref HEAD` +git config --global user.email "buildbot@rsyslog.com" +git config --global user.name "buildbot" +git branch -D tmp-CI +git branch tmp-CI +git checkout tmp-CI +git fetch origin +git merge --no-edit origin/master +if [ $? -ne 0 ]; then + echo "======================================================================" + echo "= FAIL: git merge, not doing any tests on the merge result =" + echo "======================================================================" + echo "Note: this is not an error per se, can happen. In this case the user" + echo "must be somewhat more careful when merging." + git merge --abort + git checkout ${oldbranch} + exit 0 +fi +echo "======================================================================" +echo "= SUCCESS: git merge; doing some more tests on master+PR =" +echo "======================================================================" +echo "Note: failing tests may not be reproducible if master branch advances." +echo " However, they should not be taken lightly as they point into to" +echo " two conflicting changes to the codebase." + +# from here on, we want to see what's going on and we also want to abort +# on any error. +set -v +set -e + +tests/CI/clang-check-sanitizer.sh + +git checkout ${oldbranch}