Open Bug 907496 Opened 11 years ago Updated 2 years ago

Mochitest should provide some help running from test package

Categories

(Testing :: Mochitest, defect)

x86_64
All
defect

Tracking

(Not tracked)

People

(Reporter: cmtalbert, Unassigned)

Details

Attachments

(1 file)

Attached patch mochi_cmd.diffSplinter Review
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.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: