Closed Bug 621715 Opened 14 years ago Closed 14 years ago

runxpcshelltests.py clobbers LD_LIBRARY_PATH

Categories

(Testing :: XPCShell Harness, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla2.0b9

People

(Reporter: gozer, Assigned: jhopkins)

References

Details

Attachments

(1 file)

I just discovered that runxpcshelltests.py, in needing to add the runtime path to LD_LIBRARY_PATH, also clobberes any pre-existing LD_LIBRARY_PATH in https://mxr.mozilla.org/mozilla-central/source/testing/xpcshell/runxpcshelltests.py#175 This, in the instance that I've hit, prevents running xpcshell tests on comm-central trunk, since we need a specific LD_LIBRARY_PATH set until we fully switch to the new GCC.
Product: Firefox → Core
QA Contact: build.config → build-config
Depends on: 622106
Component: Build Config → XPCShell Harness
Product: Core → Testing
QA Contact: build-config → xpcshellharness
Attached patch Fix v.1Splinter Review
Not actually my patch - after I pushed my broken one which was stealing (poorly) from mozmill to ThunderbirdTry, I saw that jhopkins had already pushed a better one, which eventually worked once TbTry started actually passing LD_LIBRARY_PATH in.
Attachment #500640 - Flags: review?(ted.mielczarek)
Assignee: nobody → john.hopkins
Comment on attachment 500640 [details] [diff] [review] Fix v.1 The ":".join bit seems excessive, self.xrePath + ":" + self.env["LD_LIBRARY_PATH"] would be fine, but it's not a deal breaker.
Attachment #500640 - Flags: review?(ted.mielczarek) → review+
Excessive, but idiomatic (and better than the also idiomatic, and even more excessive, way that I was going to steal from mozmill, http://mxr.mozilla.org/comm-central/source/mozilla/testing/mozmill/mozrunner/mozrunner/__init__.py#373). Dunno whether Python really is terrible at concatting strings, or it's just historical avoidance of some perf problem concatting a thousand in a tight loop in Python 1.0, but Python people avoid "foo" + "bar" like the plague. checkin-needed BEWARE: I told myself "I'll just push to try and strip off the trychooser bit from the message and export so it will be ready to land" but something shiny distracted me, so if someone gets to it before me, please remember to get rid of the try:... in the commit message.
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 14 years ago
Flags: in-testsuite-
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b9
String concatenation via + is only frowned upon in loops in Python, AFAIK. I think if you're only concatenating two strings you don't win anything by using join.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: