Skip to content

Commit

Permalink
rust: fix/skip tests that fail on CLANG*
Browse files Browse the repository at this point in the history
* skip debuginfo tests on all platforms

* skip tests that fail on CLANG*

* enable no-fail-fast

* checkdepends on gcc-compat package for clang

Because of the bootstrapping hack, at least one test tries to use
$TRIPLE-gcc to link rather than $TRIPLE-clang.  The easiest workaround
seems to be to ensure there is an alias to clang with that name.
  • Loading branch information
filnet committed Jun 12, 2024
1 parent bbb4173 commit 7ba1b43
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion mingw-w64-rust/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-autotools"
$([[ "$_bootstrapping" == "no" ]] && echo "${MINGW_PACKAGE_PREFIX}-rust")
"${MINGW_PACKAGE_PREFIX}-zlib")
checkdepends=($([[ ${MINGW_PACKAGE_PREFIX} != *-clang-* ]] || echo "${MINGW_PACKAGE_PREFIX}-gcc-compat"))
source=("${rust_dist_server}/${_realname}c-${pkgver}-src.tar.gz"{,.asc}
"${embed_manifest_url}"
"https://github.com/rust-lang/rust/commit/f7b2e37f7232540d9f2b2dc6e33597fbb74f4f63.patch"
Expand Down Expand Up @@ -248,10 +249,25 @@ build() {

check() {
cd "${srcdir}/${MSYSTEM}"
local -a _extra_test_args=()
if [[ $MINGW_PACKAGE_PREFIX == *-clang-* ]]; then
# these fail for gnullvm because dlltool is not used there
_extra_test_args+=(
"--skip" "tests/ui/rfcs/rfc-2627-raw-dylib/dlltool-failed.rs"
"--skip" "tests/ui/rfcs/rfc-2627-raw-dylib/invalid-dlltool.rs"
"--skip" "tests/run-make/raw-dylib-custom-dlltool")
if [[ $MINGW_PACKAGE_PREFIX == *-i686 || $MINGW_PACKAGE_PREFIX == *-x86_64 ]]; then
# these fail because we modified the *-windows-gnu specs
_extra_test_args+=(
"--skip" "spec::tests::i686_pc_windows_gnu"
"--skip" "spec::tests::x86_64_pc_windows_gnu")
fi
fi

DEP_NGHTTP_ROOT=${MINGW_PREFIX} \
DEP_OPENSSL_ROOT=${MINGW_PREFIX} \
DEP_Z_ROOT=${MINGW_PREFIX} \
${MINGW_PREFIX}/bin/python ../${_realname}c-${pkgver}-src/x.py test --stage 2 --exclude src/test/debuginfo
${MINGW_PREFIX}/bin/python ../${_realname}c-${pkgver}-src/x.py test --no-fail-fast --stage 2 -- --skip tests/debuginfo "${_extra_test_args[@]}"
}

package_rust() {
Expand Down

0 comments on commit 7ba1b43

Please sign in to comment.