@@ -11,6 +11,7 @@ set -ex
1111: " ${OS?The OS environment variable must be set.} "
1212
1313RUST=${TOOLCHAIN}
14+ VERBOSE=-v
1415
1516echo " Testing Rust ${RUST} on ${OS} "
1617
@@ -41,50 +42,50 @@ test_target() {
4142
4243 # Test that libc builds without any default features (no std)
4344 if [ " ${NO_STD} " != " 1" ]; then
44- cargo " +${RUST} " " ${BUILD_CMD} " -vv --no-default-features --target " ${TARGET} "
45+ cargo " +${RUST} " " ${BUILD_CMD} " " $VERBOSE " --no-default-features --target " ${TARGET} "
4546 else
4647 # FIXME: With `build-std` feature, `compiler_builtins` emits a lof of lint warnings.
4748 RUSTFLAGS=" -A improper_ctypes_definitions" cargo " +${RUST} " " ${BUILD_CMD} " \
48- -Z build-std=core,alloc -vv --no-default-features --target " ${TARGET} "
49+ -Z build-std=core,alloc " $VERBOSE " --no-default-features --target " ${TARGET} "
4950 fi
5051 # Test that libc builds with default features (e.g. std)
5152 # if the target supports std
5253 if [ " $NO_STD " != " 1" ]; then
53- cargo " +${RUST} " " ${BUILD_CMD} " -vv --target " ${TARGET} "
54+ cargo " +${RUST} " " ${BUILD_CMD} " " $VERBOSE " --target " ${TARGET} "
5455 else
5556 RUSTFLAGS=" -A improper_ctypes_definitions" cargo " +${RUST} " " ${BUILD_CMD} " \
56- -Z build-std=core,alloc -vv --target " ${TARGET} "
57+ -Z build-std=core,alloc " $VERBOSE " --target " ${TARGET} "
5758 fi
5859
5960 # Test that libc builds with the `extra_traits` feature
6061 if [ " ${NO_STD} " != " 1" ]; then
61- cargo " +${RUST} " " ${BUILD_CMD} " -vv --no-default-features --target " ${TARGET} " \
62+ cargo " +${RUST} " " ${BUILD_CMD} " " $VERBOSE " --no-default-features --target " ${TARGET} " \
6263 --features extra_traits
6364 else
6465 RUSTFLAGS=" -A improper_ctypes_definitions" cargo " +${RUST} " " ${BUILD_CMD} " \
65- -Z build-std=core,alloc -vv --no-default-features \
66+ -Z build-std=core,alloc " $VERBOSE " --no-default-features \
6667 --target " ${TARGET} " --features extra_traits
6768 fi
6869
6970 # Test the 'const-extern-fn' feature on nightly
7071 if [ " ${RUST} " = " nightly" ]; then
7172 if [ " ${NO_STD} " != " 1" ]; then
72- cargo " +${RUST} " " ${BUILD_CMD} " -vv --no-default-features --target " ${TARGET} " \
73+ cargo " +${RUST} " " ${BUILD_CMD} " " $VERBOSE " --no-default-features --target " ${TARGET} " \
7374 --features const-extern-fn
7475 else
7576 RUSTFLAGS=" -A improper_ctypes_definitions" cargo " +${RUST} " " ${BUILD_CMD} " \
76- -Z build-std=core,alloc -vv --no-default-features \
77+ -Z build-std=core,alloc " $VERBOSE " --no-default-features \
7778 --target " ${TARGET} " --features const-extern-fn
7879 fi
7980 fi
8081
8182 # Also test that it builds with `extra_traits` and default features:
8283 if [ " $NO_STD " != " 1" ]; then
83- cargo " +${RUST} " " ${BUILD_CMD} " -vv --target " ${TARGET} " \
84+ cargo " +${RUST} " " ${BUILD_CMD} " " $VERBOSE " --target " ${TARGET} " \
8485 --features extra_traits
8586 else
8687 RUSTFLAGS=" -A improper_ctypes_definitions" cargo " +${RUST} " " ${BUILD_CMD} " \
87- -Z build-std=core,alloc -vv --target " ${TARGET} " \
88+ -Z build-std=core,alloc " $VERBOSE " --target " ${TARGET} " \
8889 --features extra_traits
8990 fi
9091}
0 commit comments