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

test: Add a min-llvm-version directive #36198

Merged
merged 1 commit into from
Sep 3, 2016

Conversation

alexcrichton
Copy link
Member

We've got tests which require a particular version of LLVM to run as they're
testing bug fixes. Our build system, however, supports multiple LLVM versions,
so we can't run these tests on all LLVM versions.

This adds a new min-llvm-version directive for tests so they can opt out of
being run on older versions of LLVM. This then namely applies that logic to the
issue-36023.rs test case and...

Closes #36138

@alexcrichton
Copy link
Member Author

r? @brson

@rust-highfive
Copy link
Collaborator

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member Author

(note that this should hold off on r+ until we confirm travis is green)

@frewsxcv
Copy link
Member

frewsxcv commented Sep 1, 2016

https://travis-ci.org/rust-lang/rust/builds/156884048#L7287

test [run-pass] run-pass/issue-36023.rs ... ignored

🎊

.expect("Malformed llvm version directive");
// Ignore if actual version is smaller the minimum required
// version
&actual_version[..] < min_version
Copy link
Contributor

Choose a reason for hiding this comment

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

Won't this fail for something like llvm version 3.10?

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like it.

Copy link
Contributor

Choose a reason for hiding this comment

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

But LLVM 3.9 is going to be followed by 4.0 so maybe it doesn't matter.

@brson
Copy link
Contributor

brson commented Sep 1, 2016

@bors r+

@bors
Copy link
Contributor

bors commented Sep 1, 2016

📌 Commit 82b57ed has been approved by brson

@@ -148,6 +148,8 @@ pub fn compiletest(build: &Build,
if let Some(ref dir) = build.lldb_python_dir {
cmd.arg("--lldb-python-dir").arg(dir);
}
let llvm_version = output(Command::new(&llvm_config).arg("--version"));
Copy link
Member

Choose a reason for hiding this comment

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

Should this be build.llvm_config?

Copy link
Member

Choose a reason for hiding this comment

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

Regardless of what it should be, llvm_config is undefined at this point:

error[E0425]: unresolved name `llvm_config`
   --> src/bootstrap/check.rs:151:45
    |
151 |     let llvm_version = output(Command::new(&llvm_config).arg("--version"));
    |                                             ^^^^^^^^^^^

@eddyb
Copy link
Member

eddyb commented Sep 1, 2016

@bors r- due to @frewsxcv's comment

We've got tests which require a particular version of LLVM to run as they're
testing bug fixes. Our build system, however, supports multiple LLVM versions,
so we can't run these tests on all LLVM versions.

This adds a new `min-llvm-version` directive for tests so they can opt out of
being run on older versions of LLVM. This then namely applies that logic to the
`issue-36023.rs` test case and...

Closes rust-lang#36138
@alexcrichton
Copy link
Member Author

@bors: r=brson

@bors
Copy link
Contributor

bors commented Sep 1, 2016

📌 Commit 96283fc has been approved by brson

@sophiajt
Copy link
Contributor

sophiajt commented Sep 2, 2016

@bors rollup

sophiajt pushed a commit to sophiajt/rust that referenced this pull request Sep 2, 2016
test: Add a min-llvm-version directive

We've got tests which require a particular version of LLVM to run as they're
testing bug fixes. Our build system, however, supports multiple LLVM versions,
so we can't run these tests on all LLVM versions.

This adds a new `min-llvm-version` directive for tests so they can opt out of
being run on older versions of LLVM. This then namely applies that logic to the
`issue-36023.rs` test case and...

Closes rust-lang#36138
sophiajt pushed a commit to sophiajt/rust that referenced this pull request Sep 2, 2016
test: Add a min-llvm-version directive

We've got tests which require a particular version of LLVM to run as they're
testing bug fixes. Our build system, however, supports multiple LLVM versions,
so we can't run these tests on all LLVM versions.

This adds a new `min-llvm-version` directive for tests so they can opt out of
being run on older versions of LLVM. This then namely applies that logic to the
`issue-36023.rs` test case and...

Closes rust-lang#36138
sophiajt pushed a commit to sophiajt/rust that referenced this pull request Sep 2, 2016
test: Add a min-llvm-version directive

We've got tests which require a particular version of LLVM to run as they're
testing bug fixes. Our build system, however, supports multiple LLVM versions,
so we can't run these tests on all LLVM versions.

This adds a new `min-llvm-version` directive for tests so they can opt out of
being run on older versions of LLVM. This then namely applies that logic to the
`issue-36023.rs` test case and...

Closes rust-lang#36138
bors added a commit that referenced this pull request Sep 3, 2016
Rollup of 12 pull requests

- Successful merges: #35754, #35793, #36099, #36160, #36171, #36178, #36180, #36190, #36198, #36205, #36210, #36223
- Failed merges:
@bors bors merged commit 96283fc into rust-lang:master Sep 3, 2016
@sanxiyn
Copy link
Member

sanxiyn commented Sep 5, 2016

LLVM 3.9.0 release did not include r279980, so the test actually fails with LLVM 3.9.0, although it succeeds with Rust's LLVM fork.

@eddyb
Copy link
Member

eddyb commented Sep 5, 2016

@sanxiyn I'm sorry I didn't get them to backport the patches 😞.

@alexcrichton alexcrichton deleted the fix-travis branch September 6, 2016 20:54
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.

Travis is failing
9 participants