Closed Bug 915311 Opened 6 years ago Closed 6 years ago

"Please prepare your host with the environment variable MOZ_HOST_BIN" is an unhelpful error.

Categories

(Testing :: General, defect)

x86_64
Linux
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla28

People

(Reporter: ckitching, Assigned: gbrown)

Details

Attachments

(1 file)

http://mxr.mozilla.org/mozilla-central/source/testing/testsuite-targets.mk#94

This error is displayed if there exists no file $MOZ_HOST_BIN/xpcshell, but sounds like it's really complaining about the nonexistene of the MOZ_HOST_BIN variable itself. It would be clearer to split these into two errors (One worded similarly to this one for "This environment variable isn't set" and a new one for "There is no xpcshell executable in MOZ_HOST_BIN" (Should also probably check that it's really executable, not just an existent file))

Similar for
http://mxr.mozilla.org/mozilla-central/source/testing/testsuite-targets.mk#107
and
http://mxr.mozilla.org/mozilla-central/source/testing/testsuite-targets.mk#216
Assignee: nobody → gbrown
I find it surprising, but people do seem to get confused by MOZ_HOST_BIN and the message we report when xpcshell is not found. 

This patch breaks out the 1 case into 3:
1. MOZ_HOST_BIN not set:
   "please prepare your host with the environment variable MOZ_HOST_BIN"
2. MOZ_HOST_BIN set but not a directory:
   "MOZ_HOST_BIN does not specify a directory"
3. MOZ_HOST_BIN set to a directory that does not contain xpcshell:
   "xpcshell not found in MOZ_HOST_BIN"

I hope it helps!
Attachment #826795 - Flags: review?(ted)
Comment on attachment 826795 [details] [diff] [review]
improve MOZ_HOST_BIN warnings

Review of attachment 826795 [details] [diff] [review]:
-----------------------------------------------------------------

Also do we have mach commands for all of these? If so we should just move everything there.

::: testing/testsuite-targets.mk
@@ +94,1 @@
>          echo "please prepare your host with the environment variable MOZ_HOST_BIN"; \

Can you make this more explicit about what it needs here? Maybe something like "MOZ_HOST_BIN should be set to a directory containing host xpcshell etc.."
Attachment #826795 - Flags: review?(ted) → review+
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #2)
> Also do we have mach commands for all of these? If so we should just move
> everything there.

There are no corresponding mach commands for these. mach commands for Android tests are on my todo list, but I'm not quite there yet.

> Can you make this more explicit about what it needs here? Maybe something
> like "MOZ_HOST_BIN should be set to a directory containing host xpcshell etc.."

I like that - thanks! Landed with the wording change:

https://hg.mozilla.org/integration/mozilla-inbound/rev/412ab2e915cf
https://hg.mozilla.org/mozilla-central/rev/412ab2e915cf
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
You need to log in before you can comment on or make changes to this bug.