Closed Bug 727504 Opened 12 years ago Closed 12 years ago

Error messages on missing environment variables are misleading

Categories

(Testing :: Mochitest, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla13

People

(Reporter: kats, Assigned: kats)

Details

Attachments

(1 file)

If you run e.g. make mochitest-robotium without setting your MOZ_HOST_BIN correctly, then the error message that appears is "please prepare your host with environment variables for TEST_DEVICE and MOZ_HOST_BIN", even though you don't really need to set your TEST_DEVICE variable. This is misleading and confuses users; the tests should check specifically for the variables that are missing/incorrect.

Patch attached, will push to try as well at https://tbpl.mozilla.org/?tree=Try&rev=cc330708630c
Attachment #597459 - Flags: review?(jmaher)
Assignee: nobody → bugmail.mozilla
Comment on attachment 597459 [details] [diff] [review]
Fix up error message conditions

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

::: testing/testsuite-targets.mk
@@ +98,5 @@
>  mochitest-remote: DM_TRANS?=adb
>  mochitest-remote:
> +	@if [ ! -f ${MOZ_HOST_BIN}/xpcshell ]; then \
> +        echo "please prepare your host with the environment variable MOZ_HOST_BIN"; \
> +    elif [ "${TEST_DEVICE}" = "usb" -a "$(DM_TRANS)" != "adb" ]; then \

don't need the 'usb' check here, just "".

@@ +109,5 @@
>  mochitest-robotium: DM_TRANS?=adb
>  mochitest-robotium:
> +	@if [ ! -f ${MOZ_HOST_BIN}/xpcshell ]; then \
> +        echo "please prepare your host with the environment variable MOZ_HOST_BIN"; \
> +    elif [ "${TEST_DEVICE}" = "usb" -a "$(DM_TRANS)" != "adb" ]; then \

don't need the 'usb' check here also, just ""
Attachment #597459 - Flags: review?(jmaher) → review+
https://hg.mozilla.org/mozilla-central/rev/28964353f814
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: