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

Detect panic strategy using rustc --print cfg #102134

Merged
merged 5 commits into from
Sep 23, 2022
Merged

Detect panic strategy using rustc --print cfg #102134

merged 5 commits into from
Sep 23, 2022

Conversation

flba-eb
Copy link
Contributor

@flba-eb flba-eb commented Sep 22, 2022

Instead of relying on a command line parameter, detect if a target is able to unwind or not.
Ignore tests that require unwinding on targets that don't support it.

I did not find any place where the removed parameter has been used, but it feels a bit risky as
I'm new to this test framework.

r? bjorn3

@rust-highfive
Copy link
Collaborator

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

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 22, 2022
@flba-eb
Copy link
Contributor Author

flba-eb commented Sep 22, 2022

r? @bjorn3

@rust-highfive rust-highfive assigned bjorn3 and unassigned jyn514 Sep 22, 2022
@bjorn3
Copy link
Member

bjorn3 commented Sep 22, 2022

Could you try removing all test directives that exclude wasm32 when this is done because of unwinding not being supported on wasm? And maybe see if the same is done for other platforms? That would also allow testing this PR works in the first place.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Sep 22, 2022
Copy link
Member

@bjorn3 bjorn3 left a comment

Choose a reason for hiding this comment

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

r=me with the above comment fixed.

@bjorn3
Copy link
Member

bjorn3 commented Sep 22, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Sep 22, 2022

📌 Commit 676f62f has been approved by bjorn3

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 22, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 22, 2022
Detect panic strategy using `rustc --print cfg`

Instead of relying on a command line parameter, detect if a target is able to unwind or not.
Ignore tests that require unwinding on targets that don't support it.

I did not find any place where the removed parameter has been used, but it feels a bit risky as
I'm new to this test framework.

r? bjorn3
@matthiaskrgr
Copy link
Member

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 23, 2022
Instead of relying on a command line parameter, detect if a target
is able to unwind or not.
Ignore tests that require unwinding on targets that don't support it.
This test case actually requires std::process.
@bjorn3
Copy link
Member

bjorn3 commented Sep 23, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Sep 23, 2022

📌 Commit 0be3cc8 has been approved by bjorn3

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 23, 2022
@bjorn3
Copy link
Member

bjorn3 commented Sep 23, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Sep 23, 2022

📌 Commit ccd19c7 has been approved by bjorn3

It is now in the queue for this repository.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 23, 2022
Detect panic strategy using `rustc --print cfg`

Instead of relying on a command line parameter, detect if a target is able to unwind or not.
Ignore tests that require unwinding on targets that don't support it.

I did not find any place where the removed parameter has been used, but it feels a bit risky as
I'm new to this test framework.

r? bjorn3
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 23, 2022
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#102094 (Add missing documentation for `bool::from_str`)
 - rust-lang#102115 (Add examples to `bool::then` and `bool::then_some`)
 - rust-lang#102134 (Detect panic strategy using `rustc --print cfg`)
 - rust-lang#102137 (Don't convert valtree to constvalue during normalization)
 - rust-lang#102148 (add regression test for miri issue 2433)
 - rust-lang#102158 (rustdoc: clean up CSS/DOM for deprecation warnings)
 - rust-lang#102177 (Fix a typo in `std`'s root docs)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3de0d67 into rust-lang:master Sep 23, 2022
@rustbot rustbot added this to the 1.66.0 milestone Sep 23, 2022
oli-obk pushed a commit to oli-obk/rust that referenced this pull request Sep 28, 2022
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#102094 (Add missing documentation for `bool::from_str`)
 - rust-lang#102115 (Add examples to `bool::then` and `bool::then_some`)
 - rust-lang#102134 (Detect panic strategy using `rustc --print cfg`)
 - rust-lang#102137 (Don't convert valtree to constvalue during normalization)
 - rust-lang#102148 (add regression test for miri issue 2433)
 - rust-lang#102158 (rustdoc: clean up CSS/DOM for deprecation warnings)
 - rust-lang#102177 (Fix a typo in `std`'s root docs)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 3, 2022
…gs, r=Mark-Simulacrum

Adding target_rustcflags to `compiletest` TargetCfg creation

Adjustment to rust-lang#102134, ensures config returned by `rustc --target foo --print cfg` accurately reflects rustflags passed via `target_rustcflags`.

Fixes breaking change of not correctly handling `x.py test ... --test-args "--target-rustcflags -Cpanic=abort --target-rustcflags -Zpanic_abort_tests"`

cc `@djkoloski`
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 5, 2022
…, r=Mark-Simulacrum

Adding target_rustcflags to `compiletest` TargetCfg creation

Adjustment to rust-lang#102134, ensures config returned by `rustc --target foo --print cfg` accurately reflects rustflags passed via `target_rustcflags`.

Fixes breaking change of not correctly handling `x.py test ... --test-args "--target-rustcflags -Cpanic=abort --target-rustcflags -Zpanic_abort_tests"`

cc `@djkoloski`
RalfJung pushed a commit to RalfJung/miri that referenced this pull request Oct 7, 2022
…Simulacrum

Adding target_rustcflags to `compiletest` TargetCfg creation

Adjustment to rust-lang/rust#102134, ensures config returned by `rustc --target foo --print cfg` accurately reflects rustflags passed via `target_rustcflags`.

Fixes breaking change of not correctly handling `x.py test ... --test-args "--target-rustcflags -Cpanic=abort --target-rustcflags -Zpanic_abort_tests"`

cc `@djkoloski`
Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request Jan 6, 2023
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#102094 (Add missing documentation for `bool::from_str`)
 - rust-lang#102115 (Add examples to `bool::then` and `bool::then_some`)
 - rust-lang#102134 (Detect panic strategy using `rustc --print cfg`)
 - rust-lang#102137 (Don't convert valtree to constvalue during normalization)
 - rust-lang#102148 (add regression test for miri issue 2433)
 - rust-lang#102158 (rustdoc: clean up CSS/DOM for deprecation warnings)
 - rust-lang#102177 (Fix a typo in `std`'s root docs)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this pull request Apr 20, 2024
…Simulacrum

Adding target_rustcflags to `compiletest` TargetCfg creation

Adjustment to rust-lang/rust#102134, ensures config returned by `rustc --target foo --print cfg` accurately reflects rustflags passed via `target_rustcflags`.

Fixes breaking change of not correctly handling `x.py test ... --test-args "--target-rustcflags -Cpanic=abort --target-rustcflags -Zpanic_abort_tests"`

cc `@djkoloski`
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this pull request Apr 27, 2024
…Simulacrum

Adding target_rustcflags to `compiletest` TargetCfg creation

Adjustment to rust-lang/rust#102134, ensures config returned by `rustc --target foo --print cfg` accurately reflects rustflags passed via `target_rustcflags`.

Fixes breaking change of not correctly handling `x.py test ... --test-args "--target-rustcflags -Cpanic=abort --target-rustcflags -Zpanic_abort_tests"`

cc `@djkoloski`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants