Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable windows tests #102

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
environment:
# We don't want to do identical comdat folding as it messes up the ability to
# generate lossless backtraces in some cases. This is enabled by rustc by
# default so pass a flag to disable it to ensure our tests work ok.
RUSTFLAGS: -Clink-args=/OPT:NOICF

matrix:
- TARGET: x86_64-pc-windows-gnu
MSYSTEM: MINGW64
Expand All @@ -12,11 +7,6 @@ environment:
MSYSTEM: MINGW32
CPU: i686

matrix:
allow_failures:
- TARGET: x86_64-pc-windows-gnu
- TARGET: i686-pc-windows-gnu

install:
- git submodule update --init --recursive
- set PATH=c:\msys64\%MSYSTEM%\bin;c:\msys64\usr\bin;%PATH%
Expand All @@ -28,7 +18,3 @@ install:
- cargo -vV
build: false
test_script: sh ci\run.sh

branches:
only:
- master
45 changes: 34 additions & 11 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ fi
# Use cargo on native CI platforms:
case "${TARGET}" in
"x86_64-unknown-linux-gnu") export CARGO_CMD=cargo ;;
*"windows"*) export CARGO_CMD=cargo ;;
*"windows"*)
export CARGO_CMD=cargo
export NOBGT=1
;;
*"apple"*) export CARGO_CMD=cargo ;;
esac

Expand All @@ -53,10 +56,11 @@ then
esac
fi

if [ "${TARGET}" = "x86_64-unknown-linux-gnu" ] || [ "${TARGET}" = "x86_64-apple-darwin" ]
then
${CARGO_CMD} build -vv --target "${TARGET}" 2>&1 | tee build_no_std.txt
${CARGO_CMD} test -vv --target "${TARGET}" 2>&1 | tee build_no_std.txt

if [ "${TARGET}" = "x86_64-unknown-linux-gnu" ] \
|| [ "${TARGET}" = "x86_64-apple-darwin" ]
then
# Check that the no-std builds are not linked against a libc with default
# features or the `use_std` feature enabled:
! grep -q "default" build_no_std.txt
Expand All @@ -71,17 +75,36 @@ then
done
fi

${CARGO_CMD} test -vv --target "${TARGET}"
${CARGO_CMD} test -vv --target "${TARGET}" --features profiling
${CARGO_CMD} test -vv --target "${TARGET}" --features debug
${CARGO_CMD} test -vv --target "${TARGET}" --features stats
${CARGO_CMD} test -vv --target "${TARGET}" --features 'debug profiling'
${CARGO_CMD} test -vv --target "${TARGET}" \
--features unprefixed_malloc_on_supported_platforms
${CARGO_CMD} test -vv --target "${TARGET}" --no-default-features
--no-default-features \
--features debug,stats,background_threads_runtime_support,\
unprefixed_malloc_on_supported_platforms
${CARGO_CMD} test -vv --target "${TARGET}" --no-default-features \
--features background_threads_runtime_support

# jemalloc's tests fail on some targets when the profiling feature is enabled:
# https://github.com/jemalloc/jemalloc/issues/1320
# https://github.com/alexcrichton/jemallocator/issues/85
case "${TARGET}" in
*"windows"*)
unset JEMALLOC_SYS_RUN_JEMALLOC_TESTS

${CARGO_CMD} test -vv \
--target "${TARGET}" --features profiling

if [ "${NO_JEMALLOC_TESTS}" = "1" ]
then
:
else
export JEMALLOC_SYS_RUN_JEMALLOC_TESTS=1
fi

;;
*)
${CARGO_CMD} test -vv --target "${TARGET}" --features profiling
;;
esac

if [ "${NOBGT}" = "1" ]
then
echo "enabling background threads by default at run-time is not tested"
Expand Down
2 changes: 1 addition & 1 deletion jemalloc-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const NO_BG_THREAD_TARGETS: &[&str] = &["musl"];
// https://github.com/rust-lang/rust/commit/536011d929ecbd1170baf34e09580e567c971f95
// https://github.com/rust-lang/rust/commit/9f3de647326fbe50e0e283b9018ab7c41abccde3
// https://github.com/rust-lang/rust/commit/ed015456a114ae907a36af80c06f81ea93182a24
const NO_UNPREFIXED_MALLOC: &[&str] = &["android", "dragonfly", "musl", "darwin"];
const NO_UNPREFIXED_MALLOC: &[&str] = &["android", "dragonfly", "musl", "darwin", "windows"];

macro_rules! info {
($($args:tt)*) => { println!($($args)*) }
Expand Down
2 changes: 1 addition & 1 deletion jemalloc-sys/jemalloc
Submodule jemalloc updated 123 files