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

Run ios tests #498

Merged
merged 9 commits into from
Jan 18, 2017
Merged

Run ios tests #498

merged 9 commits into from
Jan 18, 2017

Conversation

learnopengles
Copy link

@learnopengles learnopengles commented Jan 16, 2017

This WIP PR runs the tests on the iOS simulator. I've tested it locally using macOS Sierra and XCode 8.2.1. I get this output:

RUNNING ALL TESTS
PASSED 6756 tests

The python script probably needs to be customized for the specific failure output from this test runner (update: newest commit should have this).

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@alexcrichton
Copy link
Member

Awesome, thanks!

Historically most of our python scripts for CI inevitably get rewritten in Rust as we maintain them over time. Perhaps we could preempt that and add this as Rust initially?

Looks like there may also be errors on Travis: https://travis-ci.org/rust-lang/libc/jobs/192426280

@learnopengles
Copy link
Author

learnopengles commented Jan 16, 2017

Hi Alex,

Rust would be OK too, but I was planning to reuse this code for the rust compiler tests where we might not have a working compiler? Not sure what you prefer here. Maybe python for now and then a conversion later? But whatever you prefer is good! :)

Hmm looks like the Travis Env doesn't have the same list of available simulators. I'll try to see how to reproduce this locally so I can fix it.

@learnopengles learnopengles force-pushed the run-ios-tests branch 2 times, most recently from 88ffcf6 to 4219e09 Compare January 17, 2017 01:22
@alexcrichton
Copy link
Member

@learnopengles looks like that did the trick for Travis! (travis is green).

And yeah I figured that if it's in Rust it'll be easier to share with the main repo anyway b/c we're trying to jettison all the python scripts there as well.

@learnopengles
Copy link
Author

Ok! So what would be a good way to integrate that in Rust? And would that be in this PR or a new one?

@alexcrichton
Copy link
Member

Oh this is just for the libc crate, not for the Rust repo itself. Let's land this here and then the next step would be to apply similar logic to the rust-lang/rust repo to the test suites.

@learnopengles
Copy link
Author

OK sounds good to me!

I think ideally we could have some shared infrastructure for both Android and iOS so we don't have to have adb and emulator calls scattered all over the place. It would be neat for this to be in cargo itself, but I think there's a good argument for not putting platform-specific deployment details inside cargo. Alternatively I can talk to the author of dinghy about modularizing some of the logic so it could be easily reused from the compiler and other places.

@alexcrichton
Copy link
Member

Yeah if the logic were in a crate that'd be ideal for sharing between all the projects I think.

Would you be ok translating the script here to Rust before landing?

@learnopengles
Copy link
Author

Hmm, in that case what form should it be in? I'm not really sure what the right way would be here. Have it be a cargo install command and then cargo run X? This probably wouldn't be a quick PR for me in any case but I'm OK if you want to keep it open until then.

@alexcrichton
Copy link
Member

Oh here we'd just have a script and do rustc foo.rs && ./foo or something like that. We could later extract it to a cargo project and such (w/ libs) later

@learnopengles
Copy link
Author

learnopengles commented Jan 17, 2017

Ah alright, that sounds like something with a much quicker turnaround :) OK, I'll get cracking on this.

@learnopengles
Copy link
Author

Hi Alex, here is the new version in Rust. Hope it's ok! :)

@alexcrichton
Copy link
Member

@bors: r+

Thanks!

@bors
Copy link
Contributor

bors commented Jan 18, 2017

📌 Commit d4a5fce has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Jan 18, 2017

⌛ Testing commit d4a5fce with merge 4eb6bf9...

bors added a commit that referenced this pull request Jan 18, 2017
Run ios tests

This WIP PR runs the tests on the iOS simulator. I've tested it locally using macOS Sierra and XCode 8.2.1. I get this output:

RUNNING ALL TESTS
PASSED 6756 tests

The python script probably needs to be customized for the specific failure output from this test runner (update: newest commit should have this).
@bors
Copy link
Contributor

bors commented Jan 18, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 4eb6bf9 to master...

@bors bors merged commit d4a5fce into rust-lang:master Jan 18, 2017
Susurrus pushed a commit to Susurrus/libc that referenced this pull request Mar 26, 2017
Add categories to Cargo.toml

Hi! [crates.io now supports categories][categories], which are a curated list
of topics aimed at helping an end-user coming to crates.io looking for
"a crate to do ______".

We're sending pull requests to selected crates to add categories in order to help
populate the categories and seed their usefulness. We've made a guess at the best
category/categories for this crate; if it doesn't fit, please feel free to take
a look at [all the available categories and their descriptions][categories] and
[the slug values that should be specified in your Cargo.toml][slugs] and pick
different ones. If you have a category in mind that isn't available, you can
[send a PR to this file on crates.io][categories.toml] to propose additional
categories.

Crates can have up to 5 categories, and uploading categories to crates.io
currently requires publishing a new version with a cargo nightly from 2017-01-18
or later (it needs to contain [this PR][cargo-pr]).

We've [published a blog post][blog-post] with further details about categories.
The blog post also talks about the new crates.io support for CI badges, which
you may be interested in adding as well.

Please let me know if you have any questions!

[categories]: https://crates.io/categories
[slugs]: https://crates.io/category_slugs
[categories.toml]: https://github.com/rust-lang/crates.io/blob/master/src/categories.toml
[cargo-pr]: rust-lang/cargo#3301
[blog-post]: http://integer32.com/2017/01/20/categories-and-ci-badges.html
@learnopengles learnopengles deleted the run-ios-tests branch July 12, 2017 17:03
danielverkamp pushed a commit to danielverkamp/libc that referenced this pull request Apr 28, 2020
…perations.

I've opened rust-lang#501 to track the workarounds introduced here.

Closes rust-lang#498.
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

Successfully merging this pull request may close these issues.

5 participants