From: Kirill Isakov Date: Sat, 12 Mar 2022 10:34:40 +0000 (+0600) Subject: CI: run `make distcheck` instead of `make check` X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=ce2864a2a8c6c146fc605f8093a6246108dddb1a;p=tinc CI: run `make distcheck` instead of `make check` --- diff --git a/.ci/deps.sh b/.ci/deps.sh index 6fdd47f4..49a7772f 100755 --- a/.ci/deps.sh +++ b/.ci/deps.sh @@ -6,8 +6,8 @@ deps_linux_alpine() { apk upgrade apk add \ - git binutils make autoconf automake gcc linux-headers diffutils texinfo \ - procps socat shadow sudo libgcrypt-dev \ + git binutils make autoconf automake gcc linux-headers diffutils \ + procps socat shadow sudo libgcrypt-dev texinfo texlive gzip \ openssl-dev zlib-dev lzo-dev ncurses-dev readline-dev musl-dev lz4-dev vde2-dev } @@ -24,7 +24,7 @@ deps_linux_debian() { apt-get upgrade -y apt-get install -y \ - git binutils make autoconf automake gcc diffutils sudo texinfo netcat-openbsd procps socat \ + git binutils make autoconf automake gcc diffutils sudo texinfo texlive netcat-openbsd procps socat \ zlib1g-dev:"$HOST" \ libssl-dev:"$HOST" \ liblzo2-dev:"$HOST" \ @@ -54,7 +54,7 @@ deps_linux_rhel() { yum upgrade -y yum install -y \ - git binutils make autoconf automake gcc diffutils sudo texinfo netcat procps systemd \ + git binutils make autoconf automake gcc diffutils sudo texinfo-tex netcat procps systemd \ findutils socat lzo-devel zlib-devel lz4-devel ncurses-devel readline-devel libgcrypt-devel "$@" if yum info openssl11-devel; then diff --git a/.ci/sanitizers/ignore.txt b/.ci/sanitizers/ignore.txt index 724f2789..c088e06e 100644 --- a/.ci/sanitizers/ignore.txt +++ b/.ci/sanitizers/ignore.txt @@ -1,3 +1,9 @@ +# plain make src:ed25519/* src:chacha-poly1305/* src:xoshiro.c + +# make distcheck +src:../../../src/ed25519/* +src:../../../src/chacha-poly1305/* +src:../../../src/xoshiro.c diff --git a/.ci/test/run.sh b/.ci/test/run.sh index b17d2de7..a7cfc299 100644 --- a/.ci/test/run.sh +++ b/.ci/test/run.sh @@ -32,12 +32,23 @@ run_tests() { header "Running test flavor $flavor" autoreconf -fsi - # shellcheck disable=SC2046 - ./configure $(sh .ci/conf.sh "$@") + + DISTCHECK_CONFIGURE_FLAGS=$(sh .ci/conf.sh "$@") + export DISTCHECK_CONFIGURE_FLAGS + + # shellcheck disable=SC2086 + ./configure $DISTCHECK_CONFIGURE_FLAGS + make -j"$(nproc)" all extra + if [ "$(uname -s)" = Linux ]; then + cmd=distcheck + else + cmd=check + fi + code=0 - make check -j2 VERBOSE=1 || code=$? + make $cmd -j2 VERBOSE=1 || code=$? sudo tar -c -z -f "/tmp/logs/tests.$flavor.tar.gz" test/ sanitizer/ diff --git a/Makefile.am b/Makefile.am index 6bf5f5e6..0956cbed 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,6 +26,12 @@ README: configure-version README.md CLEANFILES = README +# If we're running on a CI server, we may not be able to remove some test +# artifacts without using sudo because they are created by tincd running +# with root privileges. +clean-local: + if test -n "${CI}"; then sudo rm -rf test/*.test.*/; fi + ChangeLog: (cd $(srcdir) && git log) > ChangeLog