diff options
Diffstat (limited to 'build-aux')
-rwxr-xr-x | build-aux/travis-after-success | 69 | ||||
-rwxr-xr-x | build-aux/travis-before | 40 | ||||
-rwxr-xr-x | build-aux/travis-build | 180 | ||||
-rwxr-xr-x | build-aux/travis-install | 36 |
4 files changed, 0 insertions, 325 deletions
diff --git a/build-aux/travis-after-success b/build-aux/travis-after-success deleted file mode 100755 index efb0ab3..0000000 --- a/build-aux/travis-after-success +++ /dev/null @@ -1,69 +0,0 @@ -#! /bin/sh -set -e - -if [ "$PERFORM_COVERITY_SCAN" = 1 ] || [ "$DISTCHECK" = 1 ]; then - exit 0 -fi - -# All travis-* scripts must begin by initializing perlbrew if -# possible; travis does not do this for us. Unfortunately, the -# code in $PERLBREW_ROOT/etc/bashrc is crawling with bashisms, -# and the only alternatives offered are for fish and csh, not -# portable sh. Fortunately, what we need to do is simple -# enough to open-code. -if [ -f "$PERLBREW_HOME/init" ]; then - . "$PERLBREW_HOME/init" - PATH="$(echo $PATH | sed "s%:$PERLBREW_ROOT/bin:%:$PERLBREW_PATH:%")" -fi - -GCOV=gcov - -if [ "$TRAVIS_OS_NAME" = osx ]; then - case "$CC" in - gcc*) - GCC_VER="$( (brew list --versions gcc || echo gcc 0) | - sed 's/^gcc \([0-9]*\)\..*$/\1/' )" - if command -V "gcov-$GCC_VER"; then - GCOV="gcov-$GCC_VER" - fi - ;; - esac - -elif [ "$TRAVIS_OS_NAME" = linux ]; then - if [ "$CC" = clang ]; then - GCOV="$PWD/build-aux/clang-gcov-wrapper" - fi - -fi -export GCOV - -# Log the identities and versions of the coverage tools. -for tool in "$GCOV" lcov -do - # $tool might include mandatory command-line arguments. - # Interpret it the same way Make would. - set fnord $tool - shift - if command -V $1; then - echo + "$@" --version - "$@" --version - fi - echo -done -set fnord; shift # clear $@ - -set -x -# Merge all of the gcov output into one overview file using lcov, -# then prune data for the tests themselves, and for system libraries. - -lcov --gcov-tool $GCOV --rc lcov_branch_coverage=1 \ - --directory . --output-file all_coverage.info \ - --capture - -lcov --gcov-tool $GCOV --rc lcov_branch_coverage=1 \ - --directory . --output-file coverage.info \ - --remove all_coverage.info '/usr/*' '*test*' - -# Upload the pruned .info file only. -curl -sS -o codecov.bash https://codecov.io/bash -bash codecov.bash -f coverage.info diff --git a/build-aux/travis-before b/build-aux/travis-before deleted file mode 100755 index 13584f7..0000000 --- a/build-aux/travis-before +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/sh -set -e - -# All travis-* scripts must begin by initializing perlbrew if -# possible; travis does not do this for us. Unfortunately, the -# code in $PERLBREW_ROOT/etc/bashrc is crawling with bashisms, -# and the only alternatives offered are for fish and csh, not -# portable sh. Fortunately, what we need to do is simple -# enough to open-code. -if [ -f "$PERLBREW_HOME/init" ]; then - . "$PERLBREW_HOME/init" - PATH="$(echo $PATH | sed "s%:$PERLBREW_ROOT/bin:%:$PERLBREW_PATH:%")" -fi - -# Log the identities and versions of the build tools. -for tool in \ - "${CC-cc}" \ - "${NM-nm}" \ - "${AUTOCONF-autoconf}" \ - "${AUTOMAKE-automake}" \ - "${LIBTOOLIZE-libtoolize}" \ - "${PKG_CONFIG-pkg-config}" \ - "${PERL-perl}" \ - "${PYTHON-python3}" -do - # $tool might include mandatory command-line arguments. - # Interpret it the same way Make would. - set fnord $tool - shift - if command -V $1; then - echo + "$@" --version - "$@" --version - fi - echo -done -set fnord; shift # clear $@ - -# Prepare the configure scripts. -set -x -. ./autogen.sh diff --git a/build-aux/travis-build b/build-aux/travis-build deleted file mode 100755 index b5dbc55..0000000 --- a/build-aux/travis-build +++ /dev/null @@ -1,180 +0,0 @@ -#!/bin/bash -set -e - -log_time () { - local duration="$SECONDS" - local secs=$((duration % 60)); duration=$((duration / 60)) - local mins=$((duration % 60)); duration=$((duration / 60)) - local hours=$duration - if [ $hours -gt 0 ]; then - txt="${hours}h ${mins}m ${secs}s" - elif [[ $mins -gt 0 ]]; then - txt="${mins}m ${secs}s" - else - txt="${secs}s" - fi - printf 'time for %s: %s\n' "$1" "$txt" - SECONDS=0 -} - -# travis_wait is not a proper command, it's a bash function, so it is -# not available to this script. This is a simplification of code from -# https://github.com/travis-ci/travis-build/lib/travis/build/bash/ -travis_jigger () { - local cmd_pid="$1" - local timeout="$2" - local count=0 - - while [[ "$count" -lt "$timeout" ]]; do - sleep 60 - count="$((count + 1))" - echo "Long job still running (${count}m / ${timeout}m)" - done - printf '\033[33;1m%s\033[0m\n' "Timeout, terminating long job." - # Use a negative process ID to target the entire process group of - # the background job. - kill -15 "-$cmd_pid" - sleep 60 - printf '\033[31;1m%s\033[0m\n' "Timeout, killing long job." - kill -9 "-$cmd_pid" - # Ensure, as best we can, that this PID sticks around to be killed - # by travis_wait. - sleep 3600 -} -travis_wait () { - local timeout="${1}" - if [[ "${timeout}" =~ ^[0-9]+$ ]]; then - shift - else - timeout=20 - fi - - # The background jobs we're about to start must be run in separate - # process groups, so we can kill them off all at once later. - set -m - - "$@" & - local cmd_pid="$!" - - travis_jigger "$cmd_pid" "$timeout" & - local jigger_pid="$!" - - # ... but don't print reports when they finish. - set +m - - wait "$cmd_pid" 2>/dev/null - local result="$?" - if [[ "$result" -eq 0 ]]; then - : # successful completion - elif [[ "$result" -eq -15 || $result -eq -9 ]]; then - : # terminated, error already printed - elif [[ "$result" -lt 0 ]]; then - printf '\033[31;1m%s\033[0m\n' "Long job killed by signal ${result#-}" - else - printf '\033[33;1m%s\033[0m\n' "Long job exited with status ${result}" - fi - kill -15 "-$jigger_pid" - wait "$jigger_pid" - return "$result" -} - -# All travis-* scripts must begin by initializing perlbrew if -# possible; travis does not do this for us. Unfortunately, the -# code in $PERLBREW_ROOT/etc/bashrc is crawling with bashisms, -# and the only alternatives offered are for fish and csh, not -# portable sh. Fortunately, what we need to do is simple -# enough to open-code. -if [ -f "$PERLBREW_HOME/init" ]; then - . "$PERLBREW_HOME/init" - PATH="$(echo $PATH | sed "s%:$PERLBREW_ROOT/bin:%:$PERLBREW_PATH:%")" -fi - - -export NPROCS="$((`nproc --all 2>/dev/null || sysctl -n hw.ncpu` * 2))" -echo paralleism is $NPROCS - -if [[ "$PERFORM_COVERITY_SCAN" == "1" ]]; then - TAG_VERSION="`echo ${TRAVIS_BRANCH} | sed -e 's/^v//g'`" - curl -s "https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh" \ - --output /tmp/travisci_build_coverity_scan.sh - sed -i -e "s/--form version=\$SHA/--form version=\"${TAG_VERSION}\"/g" \ - -e "s/--form description=\"Travis CI build\"/--form description=\"${SHA}\"/g" \ - -e "s/201/200/g" /tmp/travisci_build_coverity_scan.sh - bash /tmp/travisci_build_coverity_scan.sh - exit 0 -fi - -if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - export CFLAGS="-O2 -g" - export CXXFLAGS="$CFLAGS" - export LDFLAGS="" - if [[ "$CC" == "gcc" ]]; then - GCC_VER="$(brew list --versions gcc | sed 's/^gcc \([0-9]*\)\..*$/\1/')" - export CC="gcc-$GCC_VER" - export CPP="cpp-$GCC_VER" - export CXX="g++-$GCC_VER" - export AR="gcc-ar-$GCC_VER" - export NM="gcc-nm-$GCC_VER" - export RANLIB="gcc-ranlib-$GCC_VER" - $CC --version - fi -elif [[ "$CODECOV" == "1" ]]; then - export CFLAGS="-O0 -g" - export CXXFLAGS="$CFLAGS" -else - export DEB_BUILD_MAINT_OPTIONS="hardening=+all" - export CPPFLAGS="$(dpkg-buildflags --get CPPFLAGS)" - export CFLAGS="$(dpkg-buildflags --get CFLAGS)" - export CXXFLAGS="$(dpkg-buildflags --get CXXFLAGS)" - export LDFLAGS="$(dpkg-buildflags --get LDFLAGS)" -fi - -if [[ "$CC" == "clang" ]]; then - export CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage" - export CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage" -else - export CFLAGS="$CFLAGS --coverage" - export CXXFLAGS="$CXXFLAGS --coverage" -fi - -MAKE_ARGS= -if [[ "$SANITIZER" == "1" ]]; then - # ASan is incompatible with -z defs. - MAKE_ARGS="UNDEF_FLAG=" - export CFLAGS="$CFLAGS -fsanitize=undefined,address" - export CXXFLAGS="$CXXFLAGS -fsanitize=undefined,address" -fi - -mkdir build -pushd build -log_time preparation - -$(cd .. && pwd)/configure --disable-silent-rules $CONF || \ - (cat config.log && exit 1) -log_time configure - -if [[ "$DISTCHECK" == "1" ]]; then - make -j$NPROCS $MAKE_ARGS distcheck || ( - find . -name test-suite\*.log -print -a -exec cat '{}' ';' - exit 1 - ) - log_time distcheck -else - make -j$NPROCS $MAKE_ARGS all - log_time build - travis_wait 60 \ - make -j$NPROCS $MAKE_ARGS check || (cat test-suite.log; exit 1) - log_time test -fi - -if [[ "$VALGRIND" == "1" ]]; then - # This step can take considerably longer than the default - # Travis no-output timeout on individual tests, just because - # that's how slow memcheck is. - travis_wait 60 \ - make -j$NPROCS $MAKE_ARGS check-valgrind-memcheck || \ - (cat test-suite-memcheck.log; exit 1) - log_time test-memcheck -fi - -popd diff --git a/build-aux/travis-install b/build-aux/travis-install deleted file mode 100755 index d818ab2..0000000 --- a/build-aux/travis-install +++ /dev/null @@ -1,36 +0,0 @@ -#! /bin/sh - -set -e - -if [ "$OLDEST_SUPPORTED_PERL" = 1 ]; then - command -V perlbrew - command -V lsb_release - - PERLV=5.14 - URL=https://storage.googleapis.com/travis-ci-language-archives/perl/binaries - URL="$URL/$(lsb_release -is | tr A-Z a-z)/$(lsb_release -rs)/$(uname -m)" - URL="$URL/perl-${PERLV}.tar.bz2" - set -x - wget -nv $URL - sudo tar xjf perl-${PERLV}.tar.bz2 --directory / - rm perl-${PERLV}.tar.bz2 - perlbrew list - perlbrew switch ${PERLV} - [ -f "$PERLBREW_HOME/init" ] || { ls -l "$PERLBREW_HOME"; exit 1; } - - . "$PERLBREW_HOME/init" - PATH="$(echo $PATH | sed "s%:$PERLBREW_ROOT/bin:%:$PERLBREW_PATH:%")" - command -v perl -fi - -if [ "$DISTCHECK" = 1 ]; then - set -x - cpanm -S -i \ - Perl::Critic \ - Perl::Critic::Freenode \ - Perl::Critic::Pulp \ - Perl::Critic::TooMuchCode \ - Perl::Tidy - perltidy --version - perlcritic --version -fi |