Skip to content

Commit

Permalink
Merge #171
Browse files Browse the repository at this point in the history
171: Fix running tests on on "stable" Rust r=KodrAus a=Mart-Bogdan

Currently all tests can be run only on nightly toolchain.
This PR fixes this, by using compiletest_rs with feature "stable" which works on stable rust, as well as on Nightly.

**P.S.** I wanted to make some use of cfg flags, but this solution seems working, despite loading but more packages then with nightly only.

**P.P.S.** What about specifying exact version of **compiletest_rs**, like "0.3.18", which is current, to not break further builds/tests ?

Co-authored-by: Bogdan Mart <mart.bogdan@gmail.com>
  • Loading branch information
bors[bot] and Mart-Bogdan committed Jan 30, 2019
2 parents cf2d746 + 87caf02 commit bb53c19
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,2 +1,4 @@
target
Cargo.lock

/.idea/
4 changes: 3 additions & 1 deletion .travis.yml
Expand Up @@ -3,16 +3,18 @@ branches:
- /.*(.tmp)$/

language: rust
env: EXTRA_ARGS="--features unstable"
matrix:
include:
# This version is tested to avoid unintentional bumping of the minimum supported Rust version
- rust: 1.20.0
# This version don't support unstable features
env: EXTRA_ARGS=""
- rust: stable
- rust: stable
os: osx
- rust: beta
- rust: nightly
env: EXTRA_ARGS="--features unstable"

sudo: false
script:
Expand Down
2 changes: 1 addition & 1 deletion test_suite/Cargo.toml
Expand Up @@ -7,7 +7,7 @@ unstable = ["compiletest_rs"]

[dependencies]
bitflags = { path = "../" }
compiletest_rs = { version = "*", optional = true }
compiletest_rs = { version = "0.3.18", optional = true, features=["stable"] }
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"

0 comments on commit bb53c19

Please sign in to comment.