Skip to content

set default target to linux for tests so we can run the tests on non-linux machines #1261

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

Merged
merged 2 commits into from
Jan 23, 2021

Conversation

syphar
Copy link
Member

@syphar syphar commented Jan 23, 2021

I found out that df48965 broke the tests in web/rustdoc for me, since it changes from a hard-coded linux default-target to using docsrs_metadata::HOST_TARGET, which is x86_64-apple-darwin on my machine.

Some test-cases ( for example web::rustdoc::test::default_target_redirects_to_base) rely on the default-target of the fake-release being linux.

This PR reverts that part of df48965 so the tests are fine again.

@Nemo157
Copy link
Member

Nemo157 commented Jan 23, 2021

I think the "default target" should be specified in Config, probably loading from an environment-variable and defaulting to HOST_TARGET if unspecified, then the tests would be able to override that to always be x86_64-linux-unknown-gnu in the TestEnvironment.

Copy link
Member

@Nemo157 Nemo157 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems good for the tests at least, rather than having to dynamically construct urls.

@syphar syphar marked this pull request as ready for review January 23, 2021 12:12
@syphar syphar changed the title (draft) set default target to linux for tests so we can run the tests on non-linux machines set default target to linux for tests so we can run the tests on non-linux machines Jan 23, 2021
@syphar syphar force-pushed the linux-default-target-tests branch from 51c9983 to 901726c Compare January 23, 2021 17:24
@jyn514 jyn514 merged commit 9fe8f02 into rust-lang:master Jan 23, 2021
@syphar syphar deleted the linux-default-target-tests branch January 23, 2021 18:02
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.

3 participants