Skip to content

Commit

Permalink
Fix rand_core 0.3 dependency; hack tests
Browse files Browse the repository at this point in the history
Avoid doc-tests on rand_core since those don't work with multiple package versions
  • Loading branch information
dhardy committed Oct 3, 2018
1 parent c89a217 commit c6ddc47
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,27 @@ sudo: false
# - pinned stable, latest stable, beta and nightly Rust releases
# - Linux, OS X, Android, iOS, bare metal (i.e. no_std)
# - x86_64, ARMv7, a Big-Endian arch (MIPS)
# HACK: use --tests to disable doc-tests for rand_core 0.2 (see #619)
matrix:
include:
- rust: 1.22.0
install:
script:
- cargo test --tests --no-default-features
- cargo test --package rand_core --no-default-features
- cargo test --package rand_core:0.2.2 --no-default-features --tests
- cargo test --features serde1,log
- rust: stable
os: osx
install:
script:
- cargo test --tests --no-default-features
- cargo test --package rand_core --no-default-features
- cargo test --package rand_core:0.2.2 --no-default-features --tests
- cargo test --features serde1,log
- rust: beta
install:
script:
- cargo test --tests --no-default-features
- cargo test --package rand_core --no-default-features
- cargo test --package rand_core:0.2.2 --no-default-features --tests
- cargo test --features serde1,log
- rust: nightly
install:
Expand All @@ -34,7 +35,7 @@ matrix:
- pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH
script:
- cargo test --tests --no-default-features --features=alloc
- cargo test --package rand_core --no-default-features --features=alloc,serde1
- cargo test --package rand_core:0.2.2 --no-default-features --features=alloc,serde1 --tests
- cargo test --features serde1,log,nightly,alloc
- cargo test --all --benches
# remove cached documentation, otherwise files from previous PRs can get included
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ install:
build: false

test_script:
- cargo test --all # cannot use --all and --features together
- cargo test --all --tests # cannot use --all and --features together
- cargo test --all --benches
- cargo test --features serde1,log,nightly
- cargo test --tests --no-default-features --features=alloc,serde1
- cargo test --package rand_core --no-default-features --features=alloc,serde1
- cargo test --package rand_core:0.2.2 --no-default-features --features=alloc,serde1 --tests
2 changes: 1 addition & 1 deletion rand_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ alloc = ["rand_core/alloc"] # enables Vec and Box support without std
serde1 = ["rand_core/serde", "rand_core/serde_derive"] # enables serde for BlockRng wrapper

[dependencies]
rand_core = "0.3"
rand_core = { version = "0.3", default-features = false }
serde = { version = "1", optional = true }
serde_derive = { version = "^1.0.38", optional = true }
4 changes: 2 additions & 2 deletions utils/ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ main() {

if [ ! -z $NIGHTLY ]; then # have nightly Rust
cross test --tests --no-default-features --features alloc --target $TARGET
cross test --package rand_core --no-default-features --features alloc --target $TARGET
cross test --package rand_core:0.2.2 --no-default-features --features alloc --target $TARGET --tests
cross test --features serde1,log,nightly,alloc --target $TARGET
cross test --all --benches --target $TARGET
else # have stable Rust
cross test --tests --no-default-features --target $TARGET
cross test --package rand_core --no-default-features --target $TARGET
cross test --package rand_core:0.2.2 --no-default-features --target $TARGET --tests
cross test --features serde1,log --target $TARGET
fi
}
Expand Down

0 comments on commit c6ddc47

Please sign in to comment.