If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Mochitest should provide some help running from test package

NEW
Unassigned

Status

Testing
Mochitest
4 years ago
3 years ago

People

(Reporter: cmtalbert, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
Created attachment 793221 [details] [diff] [review]
mochi_cmd.diff

Currently, if you download a test package and you attempt to run mochitest and you don't know to specify --utility-path or --certificate-path then you get very cryptic tracebacks that essentially say "you didn't put values in these variables".  But to an unaccustomed eye, they are completely illegible.

This patch makes some nice error messages. In-tree mach and make targets still work normally.
Attachment #793221 - Flags: review?(jmaher)
Comment on attachment 793221 [details] [diff] [review]
mochi_cmd.diff

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

could you add xre-path as well?

r=me.  These are minor details, no need to r- and re-review.

::: testing/mochitest/mochitest_options.py
@@ +374,5 @@
>              msg = """\
>              Error: Path %(app)s doesn't exist.
>              Are you executing $objdir/_tests/testing/mochitest/runtests.py?"""
>              self.error(msg % {"app": options.app})
>              return None

I notice there is a return None here after the self.error() call.  Do you need that in your messages as well?

@@ +382,5 @@
> +                  options.utilityPath = build_obj.get_binary_path()
> +              else:
> +                msg="""\
> +                Could not find utility path. --utility-path should be specified.
> +                It should point to the bin/ directory of the extracted tests.zip package"""

I would like to add " where the xpcshell binary is located"

@@ +383,5 @@
> +              else:
> +                msg="""\
> +                Could not find utility path. --utility-path should be specified.
> +                It should point to the bin/ directory of the extracted tests.zip package"""
> +                self.error(msg)

4 space indent here.
Attachment #793221 - Flags: review?(jmaher) → review+
This is a good step. We had talked about (in bug 524130) making the scripts "just work" if you unzipped the build + test package in the same place as tbpl builds do, by assuming default paths for things.
bug 1058923 provides an alternate solution here.
You need to log in before you can comment on or make changes to this bug.