Add tests with musl libc.

This commit is contained in:
Yury Gribov
2025-01-26 15:14:52 +03:00
parent 8b635359ed
commit 7004d5b595
3 changed files with 27 additions and 4 deletions
+11
View File
@@ -104,6 +104,17 @@ jobs:
# - uses: actions/checkout@v3
# - name: Run tests
# run: scripts/travis.sh
musl:
runs-on: ubuntu-latest
env:
CC: musl-gcc
steps:
- uses: actions/checkout@v3
- name: Install deps
run: sudo apt-get update && sudo apt-get install musl-tools
- name: Run tests
run: scripts/travis.sh
# TODO: test on llvm-libc when it supports dlfcn
x86:
runs-on: ubuntu-latest
env:
+8 -4
View File
@@ -23,7 +23,7 @@ tests/basic/run.sh $ARCH
tests/exceptions/run.sh $ARCH
tests/data-warnings/run.sh $ARCH
tests/vtables/run.sh $ARCH
if test -z "$ARCH"; then
if test -z "$ARCH" && ! echo "${CC:-}" | grep -q musl-gcc; then
# TODO: enable for other targets
tests/ld/run.sh
fi
@@ -34,9 +34,11 @@ fi
tests/hidden/run.sh $ARCH
tests/verbose/run.sh $ARCH
tests/no_dlopen/run.sh $ARCH
tests/multiple-dlopens/run.sh $ARCH
tests/multiple-dlopens-2/run.sh $ARCH
tests/multiple-dlopens-3/run.sh $ARCH
if ! echo "${CC:-}" | grep -q musl-gcc; then # Musl does not implement dlclose
tests/multiple-dlopens/run.sh $ARCH
tests/multiple-dlopens-2/run.sh $ARCH
tests/multiple-dlopens-3/run.sh $ARCH
fi
if ! echo "$ARCH" | grep -q powerpc; then
tests/many-functions/run.sh $ARCH
fi
@@ -47,3 +49,5 @@ if ! echo "$ARCH" | grep -q 'powerpc\|mips\|riscv'; then
fi
tests/thread/run.sh $ARCH
tests/thread-2/run.sh $ARCH
echo 'All tests passed'
+8
View File
@@ -1,3 +1,10 @@
# Copyright 2019-2025 Yury Gribov
#
# The MIT License (MIT)
#
# Use of this source code is governed by MIT license that can be
# found in the LICENSE.txt file.
if test -n "${TRAVIS:-}"; then
set -x
fi
@@ -94,6 +101,7 @@ fi
# Do not bother with non-native targets
if test -z "$INTERP" \
&& ! echo "$CC" | grep -q musl-gcc \
&& uname | grep -q Linux \
&& echo 'int main() {}' | $CC $CFLAGS -fsanitize=thread -x c - -o /dev/null 2> /dev/null; then
TSAN_AVAILABLE=1