From 25ce053a2d42a94bcc2c27883eb81c2fe45e5a69 Mon Sep 17 00:00:00 2001 From: Kamal Marhubi Date: Sun, 16 Apr 2017 23:51:18 -0400 Subject: ci: Allow skipping tests when running under CI This adds `--cfg=travis` to builds under CI, allowing tests to be conditionally ignored by marking them with #[cfg_attr(travis, ignore)] refs #568 --- ci/script.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ci/script.sh') diff --git a/ci/script.sh b/ci/script.sh index 39c3aeec..df61c35a 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -3,6 +3,11 @@ set -ex main() { + # Add a cfg spec to allow disabling specific tests under CI. + if [ "$TRAVIS" = true ]; then + export RUSTFLAGS=--cfg=travis + fi + # Build debug and release targets cross build --target $TARGET cross build --target $TARGET --release -- cgit v1.2.3