@@ -8,7 +8,6 @@ echo "Running tests for target: ${TARGET}, Rust version=${TRAVIS_RUST_VERSION}"
88export RUST_BACKTRACE=1
99export RUST_TEST_THREADS=1
1010export RUST_TEST_NOCAPTURE=1
11- export CARGO_CMD=cross
1211
1312# FIXME: workaround cargo breaking Travis-CI again:
1413# https://github.com/rust-lang/cargo/issues/5721
2524 export JEMALLOC_SYS_RUN_JEMALLOC_TESTS=1
2625fi
2726
28- # Use cargo on native CI platforms:
29- case " ${TARGET} " in
30- " x86_64-unknown-linux-gnu" ) export CARGO_CMD=cargo ;;
31- * " windows" * ) export CARGO_CMD=cargo ;;
32- * " apple" * ) export CARGO_CMD=cargo ;;
33- esac
34-
35- if [ " ${CARGO_CMD} " = " cross" ]
36- then
37- cargo install cross || echo " cross is already installed"
38- fi
39-
4027if [ " ${VALGRIND} " = " 1" ]
4128then
4229 case " ${TARGET} " in
5643if [ " ${TARGET} " = " x86_64-unknown-linux-gnu" ] || [ " ${TARGET} " = " x86_64-apple-darwin" ]
5744then
5845 # Not using tee to avoid too much logs that exceeds travis' limit.
59- if ! ${CARGO_CMD} build -vv --target " ${TARGET} " > build_no_std.txt 2>&1 ; then
46+ if ! cargo build -vv --target " ${TARGET} " > build_no_std.txt 2>&1 ; then
6047 tail -n 1024 build_no_std.txt
6148 exit 1
6249 fi
7562 done
7663fi
7764
78- ${CARGO_CMD} test --target " ${TARGET} "
65+ cargo test --target " ${TARGET} "
66+ cargo test --target " ${TARGET} " --features profiling
67+ cargo test --target " ${TARGET} " --features debug
68+ cargo test --target " ${TARGET} " --features stats
69+ cargo test --target " ${TARGET} " --features ' debug profiling'
7970
80- if [ " ${JEMALLOC_SYS_GIT_DEV_BRANCH} " = " 1" ]; then
81- # FIXME: profiling tests broken on dev-branch
82- # https://github.com/jemalloc/jemalloc/issues/1477
83- :
84- else
85- ${CARGO_CMD} test --target " ${TARGET} " --features profiling
86- fi
87-
88- ${CARGO_CMD} test --target " ${TARGET} " --features debug
89- ${CARGO_CMD} test --target " ${TARGET} " --features stats
90- if [ " ${JEMALLOC_SYS_GIT_DEV_BRANCH} " = " 1" ]; then
91- # FIXME: profiling tests broken on dev-branch
92- # https://github.com/jemalloc/jemalloc/issues/1477
93- :
94- else
95- ${CARGO_CMD} test --target " ${TARGET} " --features ' debug profiling'
96- fi
97-
98- ${CARGO_CMD} test --target " ${TARGET} " \
99- --features unprefixed_malloc_on_supported_platforms
100- ${CARGO_CMD} test --target " ${TARGET} " --no-default-features
101- ${CARGO_CMD} test --target " ${TARGET} " --no-default-features \
102- --features background_threads_runtime_support
71+ cargo test --target " ${TARGET} " \
72+ --features unprefixed_malloc_on_supported_platforms
73+ cargo test --target " ${TARGET} " --no-default-features
74+ cargo test --target " ${TARGET} " --no-default-features \
75+ --features background_threads_runtime_support
10376
10477if [ " ${NOBGT} " = " 1" ]
10578then
10679 echo " enabling background threads by default at run-time is not tested"
10780else
108- ${CARGO_CMD} test --target " ${TARGET} " --features background_threads
81+ cargo test --target " ${TARGET} " --features background_threads
10982fi
11083
111- ${CARGO_CMD} test --target " ${TARGET} " --release
112- ${CARGO_CMD} test --target " ${TARGET} " --manifest-path jemalloc-sys/Cargo.toml
113- ${CARGO_CMD} test --target " ${TARGET} " \
84+ cargo test --target " ${TARGET} " --release
85+ cargo test --target " ${TARGET} " --manifest-path jemalloc-sys/Cargo.toml
86+ cargo test --target " ${TARGET} " \
11487 --manifest-path jemalloc-sys/Cargo.toml \
11588 --features unprefixed_malloc_on_supported_platforms
11689
@@ -120,20 +93,19 @@ case "${TARGET}" in
12093 " x86_64-unknown-linux-musl" ) ;;
12194 * )
12295
123- ${CARGO_CMD} test --target " ${TARGET} " \
124- --manifest-path jemalloc-ctl/Cargo.toml \
125- --no-default-features
96+ cargo test --target " ${TARGET} " \
97+ --manifest-path jemalloc-ctl/Cargo.toml \
98+ --no-default-features
12699 # FIXME: cross fails to pass features to jemalloc-ctl
127100 # ${CARGO_CMD} test --target "${TARGET}" \
128101 # --manifest-path jemalloc-ctl \
129102 # --no-default-features --features use_std
130103 ;;
131104esac
132105
133- ${CARGO_CMD} test --target " ${TARGET} " -p systest
134- ${CARGO_CMD} test --target " ${TARGET} " \
135- --manifest-path jemallocator-global/Cargo.toml
136- ${CARGO_CMD} test --target " ${TARGET} " \
106+ cargo test --target " ${TARGET} " -p systest
107+ cargo test --target " ${TARGET} " --manifest-path jemallocator-global/Cargo.toml
108+ cargo test --target " ${TARGET} " \
137109 --manifest-path jemallocator-global/Cargo.toml \
138110 --features force_global_jemalloc
139111
0 commit comments