Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/unit.rs broken on nightly builds #371

Closed
behnam opened this issue Jun 30, 2017 · 1 comment
Closed

tests/unit.rs broken on nightly builds #371

behnam opened this issue Jun 30, 2017 · 1 comment

Comments

@behnam
Copy link
Contributor

behnam commented Jun 30, 2017

Travis: https://travis-ci.org/servo/rust-url/jobs/248944414

Example error:

error[E0560]: struct `__test::test::TestDesc` has no field named `allow_fail`
  --> tests/unit.rs:20:1
   |
20 | / fn size() {
21 | |     use std::mem::size_of;
22 | |     assert_eq!(size_of::<Url>(), size_of::<Option<Url>>());
23 | | }
   | |_^ `__test::test::TestDesc` does not have this field

I think it's caused by tests/unit.rs having test harness enabled, and the test internals having changed and not conflicting rustc-test package used here.

I'm not sure what's the best option for a fix:

  • Disabling harness for unit.rs and copying in boilerplate to get the tests running; or
  • Updating rustc-test to make it compatible.

What do you think, @SimonSapin ?

@SimonSapin
Copy link
Member

I think we should make rustc-test use https://crates.io/crates/rustc_version to conditionally compile and work with compiler that do or do not include the allow_fail field.

SimonSapin added a commit that referenced this issue Jul 1, 2017
bors-servo pushed a commit that referenced this issue Jul 1, 2017
Update rustc-test to 0.2, fix #371

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-url/372)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this issue Jul 1, 2017
Update rustc-test to 0.2, fix #371

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-url/372)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants