]> granicus.if.org Git - strace/commitdiff
ci: add more variants of unwinder to test matrices
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 4 May 2018 23:13:45 +0000 (23:13 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 4 May 2018 23:13:45 +0000 (23:13 +0000)
Check x86_64 builds with libdw, with libunwind, and without stacktrace.
As Travis CI doesn't provide a suitable libdw, do not test libdw there.

* ci/install-dependencies.sh (common_packages): Remove libdw-dev.
Install libdw-dev or libunwind8-dev depending on $STACKTRACE.
* ci/run-build-and-tests.sh: Specify --with-libdw=yes,
--with-libunwind=yes, or --without-stacktrace depending on $STACKTRACE.
* .gitlab-ci.yml (gcc-x86_64): Rename to gcc-x86_64-libdw,
add STACKTRACE=libdw.
(gcc-x86): Rename to gcc-x86-nounwind, add STACKTRACE=no.
(clang-x86_64): Rename to clang-x86_64-libdw, add STACKTRACE=libdw.
(clang-x86): Rename to clang-x86-nounwind, add STACKTRACE=no.
(gcc-x86_64-libunwind, gcc-x86_64-nounwind, gcc-x86-nounwind,
clang-x86_64-libunwind, clang-x86_64-nounwind, clang-x86-nounwind):
New test matrix entries.
* .travis.yml: Add STACKTRACE=libunwind to all x86_64 test matrix
entries except musl-gcc, add STACKTRACE=no to other matrix entries,
add test matrix entries with STACKTRACE=no variants on x86_64.

.gitlab-ci.yml
.travis.yml
ci/install-dependencies.sh
ci/run-build-and-tests.sh

index 4ac054a7f33f95a29b1315a1bc041d1487d276b3..b283cd63b0c5751a08aa84dcca1bd636ab7b278c 100644 (file)
@@ -8,30 +8,66 @@ variables:
   SLEEP_A_BIT: "sleep 0.2"
   VERBOSE: "1"
 
-gcc-x86_64:
+gcc-x86_64-libdw:
   stage: test
   script: ci/run-build-and-tests.sh
   variables:
     CC: "gcc"
     TARGET: "x86_64"
+    STACKTRACE: "libdw"
 
-gcc-x86:
+gcc-x86_64-libunwind:
+  stage: test
+  script: ci/run-build-and-tests.sh
+  variables:
+    CC: "gcc"
+    TARGET: "x86_64"
+    STACKTRACE: "libunwind"
+
+gcc-x86_64-nounwind:
+  stage: test
+  script: ci/run-build-and-tests.sh
+  variables:
+    CC: "gcc"
+    TARGET: "x86_64"
+    STACKTRACE: "no"
+
+gcc-x86-nounwind:
   stage: test
   script: ci/run-build-and-tests.sh
   variables:
     CC: "gcc"
     TARGET: "x86"
+    STACKTRACE: "no"
+
+clang-x86_64-libdw:
+  stage: test
+  script: ci/run-build-and-tests.sh
+  variables:
+    CC: "clang"
+    TARGET: "x86_64"
+    STACKTRACE: "libdw"
+
+clang-x86_64-libunwind:
+  stage: test
+  script: ci/run-build-and-tests.sh
+  variables:
+    CC: "clang"
+    TARGET: "x86_64"
+    STACKTRACE: "libunwind"
 
-clang-x86_64:
+clang-x86_64-nounwind:
   stage: test
   script: ci/run-build-and-tests.sh
   variables:
     CC: "clang"
     TARGET: "x86_64"
+    STACKTRACE: "no"
 
-clang-x86:
+clang-x86-nounwind:
   stage: test
   script: ci/run-build-and-tests.sh
   variables:
     CC: "clang"
     TARGET: "x86"
+    STACKTRACE: "no"
index 0091e460460497b74dd87ff3ab13ac9778625dc4..5666ab5d118d01248835e9b1e5c600d9da4b3900 100644 (file)
@@ -21,35 +21,50 @@ matrix:
     - compiler: gcc
       env:
         - TARGET=x86_64
+        - STACKTRACE=libunwind
         - CHECK=coverage
         - KHEADERS=torvalds/linux
     - compiler: gcc
       env:
         - TARGET=x86_64
+        - STACKTRACE=libunwind
     - compiler: gcc
       env:
         - TARGET=x32
+        - STACKTRACE=no
     - compiler: gcc
       env:
         - TARGET=x86
+        - STACKTRACE=no
     - compiler: clang
       env:
         - TARGET=x86_64
+        - STACKTRACE=libunwind
     - compiler: musl-gcc
       env:
         - TARGET=x86_64
+        - STACKTRACE=no
     - compiler: clang
       env:
         - TARGET=x86
+        - STACKTRACE=no
     - compiler: musl-gcc
       env:
         - TARGET=x86
+        - STACKTRACE=no
     - compiler: gcc-7
       env:
         - TARGET=x86_64
+        - STACKTRACE=libunwind
     - compiler: gcc-7
       env:
         - TARGET=x32
+        - STACKTRACE=no
     - compiler: gcc-7
       env:
         - TARGET=x86
+        - STACKTRACE=no
+    - compiler: gcc
+      env:
+        - TARGET=x86_64
+        - STACKTRACE=no
index 75cbaf6d34616221db07d284b00e0693a45994ee..e704d44e52e91888f5b07dc737965606fe084f0b 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh -ex
 
 type sudo >/dev/null 2>&1 && sudo=sudo || sudo=
-common_packages='autoconf automake faketime file gawk gcc-multilib git gzip libdw-dev make pkg-config xz-utils'
+common_packages='autoconf automake faketime file gawk gcc-multilib git gzip make pkg-config xz-utils'
 
 updated=
 apt_get_install()
@@ -90,6 +90,15 @@ case "$CC" in
                ;;
 esac
 
+case "${STACKTRACE-}" in
+       libdw)
+               apt_get_install libdw-dev libz-dev liblzma-dev
+               ;;
+       libunwind)
+               apt_get_install libunwind8-dev
+               ;;
+esac
+
 case "${CHECK-}" in
        coverage)
                apt_get_install lcov
index c43e374a25409750a60c9b0cb3123bcdfcf14f19..c3c382e929c884a29e73482396d5f6131ce7263c 100755 (executable)
@@ -24,6 +24,15 @@ case "${TARGET-}" in
                ;;
 esac
 
+case "${STACKTRACE-}" in
+       libdw|libunwind)
+               DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --with-$STACKTRACE"
+               ;;
+       no)
+               DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --disable-stacktrace"
+               ;;
+esac
+
 case "$KHEADERS" in
        */*)
                CPPFLAGS='-isystem /opt/kernel/include'