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

Sanity check Python on OSX for LLDB tests #33084

Merged
merged 2 commits into from
Apr 23, 2016

Conversation

alexcrichton
Copy link
Member

Two primary changes:

  • Don't get past the configure stage if python isn't coming from /usr/bin
  • Call debugger.Terminate() to prevent segfaults on newer versions of LLDB.

Closes #32994

@alexcrichton
Copy link
Member Author

r? @michaelwoerister

@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 tests still won't pass on the most recent OSX version due to what I believe is #33062.

need to uninstall it entirely (or move it out of 'PATH') to get lldb tests
working.

", python.display());
Copy link
Member

Choose a reason for hiding this comment

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

Does this mean one cannot even build Rust when another Python version is in PATH?

Copy link
Member Author

Choose a reason for hiding this comment

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

I unfortunately didn't get that far in testing. If I had Homebrew Python installed and /usr/local/bin/python in my PATH then I'd still get weird errors about a missing "six" module, but once /usr/local/bin was removed from PATH that error went away.

Python would successfully report an import of the lldb module (or at least the interpreter would exit cleanly) but would print some other errors during the ./configure step.

I can try to get a clearer picture of what's going on soon as well.

Copy link
Member

Choose a reason for hiding this comment

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

Couldn't we just adapt compiletest to always use /usr/bin/python for running the LLDB scripts on OSX?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, so to be clear scary errors are printed out if /usr/local/bin is in PATH even if /usr/bin/python is used:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 98, in <module>
    import six
ImportError: No module named six

That being said the lldb_batchmode.py script seems to run just fine and continue despite this error.

Unfortunately I still can't get tests passing due to #33062, but it seems like yes, we should just tell compiletest to use /usr/bin/python unconditionally.

Right now on the most recent version of LLDB installed on OSX we'll segfault on
all the LLDB tests if this isn't called (unfortunately). Hopefully we've updated
LLDB on the bots to actually get this working everywhere!

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

Ok, I've modified to let ./configure always pass but we just force /usr/bin/python on OSX for LLDB tests only

CFG_LLDB_PYTHON=/usr/bin/python
;;
*)
CFG_LLDB_PYTHOn=$CFG_PYTHON
Copy link
Member

Choose a reason for hiding this comment

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

CFG_LLDB_PYTHOn <- the lowercase 'n' is probably a typo.

Copy link
Member Author

Choose a reason for hiding this comment

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

Indeed!

Force usage of /usr/bin/python whenever we run LLDB tests on OSX because it
looks like no other Python will work.
@michaelwoerister
Copy link
Member

Looks good. Thanks Alex!

@michaelwoerister
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Apr 19, 2016

📌 Commit cbe6292 has been approved by michaelwoerister

@bors
Copy link
Contributor

bors commented Apr 21, 2016

⌛ Testing commit cbe6292 with merge 4c34d4e...

@bors
Copy link
Contributor

bors commented Apr 21, 2016

💔 Test failed - auto-win-msvc-32-opt

@michaelwoerister
Copy link
Member

These errors don't seem related...

@michaelwoerister
Copy link
Member

@bors retry

@bors
Copy link
Contributor

bors commented Apr 21, 2016

💔 Test failed - auto-win-gnu-32-nopt-t

@alexcrichton
Copy link
Member Author

@bors: retry

On Thu, Apr 21, 2016 at 10:58 AM, bors [email protected] wrote:

[image: 💔] Test failed - auto-win-gnu-32-nopt-t
http://buildbot.rust-lang.org/builders/auto-win-gnu-32-nopt-t/builds/3885


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#33084 (comment)

@bors
Copy link
Contributor

bors commented Apr 22, 2016

⌛ Testing commit cbe6292 with merge 680327d...

@bors
Copy link
Contributor

bors commented Apr 22, 2016

💔 Test failed - auto-win-msvc-64-opt-mir

@alexcrichton
Copy link
Member Author

@bors: retry

On Fri, Apr 22, 2016 at 2:44 AM, bors [email protected] wrote:

[image: 💔] Test failed - auto-win-msvc-64-opt-mir
http://buildbot.rust-lang.org/builders/auto-win-msvc-64-opt-mir/builds/398


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#33084 (comment)

Manishearth added a commit to Manishearth/rust that referenced this pull request Apr 22, 2016
…ichaelwoerister

Sanity check Python on OSX for LLDB tests

Two primary changes:

* Don't get past the configure stage if `python` isn't coming from `/usr/bin`
* Call `debugger.Terminate()` to prevent segfaults on newer versions of LLDB.

Closes rust-lang#32994
@bors
Copy link
Contributor

bors commented Apr 23, 2016

⌛ Testing commit cbe6292 with merge ef57fb7...

bors added a commit that referenced this pull request Apr 23, 2016
…ster

Sanity check Python on OSX for LLDB tests

Two primary changes:

* Don't get past the configure stage if `python` isn't coming from `/usr/bin`
* Call `debugger.Terminate()` to prevent segfaults on newer versions of LLDB.

Closes #32994
@bors bors merged commit cbe6292 into rust-lang:master Apr 23, 2016
@alexcrichton alexcrichton deleted the osx-python-sanity branch May 2, 2016 18:44
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