Closed Bug 769606 Opened 12 years ago Closed 11 years ago

[mozrunner] Make application information (application.ini) available

Categories

(Testing :: Mozbase, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 928452

People

(Reporter: whimboo, Unassigned)

References

Details

If you want to get information about the application it's hard-coded right now in Mozrunner and only returns the repository information:

https://github.com/mozilla/mozbase/blob/master/mozrunner/mozrunner/runner.py#L132

We also need information like that in our automation scripts but do not want to re-implement the same code. If mozinfo would have an API for application information it would be great.

My proposal:

CLI: mozinfo --binary /Applications/Firefox.app/Contents/MacOS/firefox
API: mozinfo.get_application_information(real_binary)

When we implement that we also have to take care that on OS X the application.ini file can also be located under Contents/Resources given how the application has been build.

Jeff, what is your take? Do you agree? If yes I would implement that API and CLI option.
I am very hesitant to take something this complicated for mozinfo.  mozinfo is widely used in m-c where this information is gathered otherwise (see http://mxr.mozilla.org/mozilla-central/search?string=mozinfo).  If it were just a matter of pointing to an application.ini file, versus a binary, I would be more inclined towards it, depending on what keys etc it were wanted, as the location of the application.ini file from the binary is not guaranteed or, as you point out on at least mac, standard.  The looping through the files as it is in that function seems undocumented and their storage as keys e.g. 'application_sourcestamp' seems a bit nonsensical to me. Is that function even called anywhere?  I'm fine cleaning it up and moving to a free-standing function in mozrunner, if that helps.  I'm not sure if it belongs in mozinfo.  I'd also be fine getting rid of the function.

Though if others have opinions, I'd love to know their thoughts.
I have checked the meeting notes from our work week and surprisingly have seen that we decided to have it as a separate function in mozrunner. So this would match again with your proposal in comment 1.

Yes, we need this function to determine the source repository and changeset for the application under test. Also it helps to find the application name and version, which we also need for our mozmill-automation package.
(In reply to Henrik Skupin (:whimboo) from comment #2)
> I have checked the meeting notes from our work week and surprisingly have
> seen that we decided to have it as a separate function in mozrunner. So this
> would match again with your proposal in comment 1.
> 
> Yes, we need this function to determine the source repository and changeset
> for the application under test. Also it helps to find the application name
> and version, which we also need for our mozmill-automation package.

Changing summary accordingly
Summary: [mozinfo] Make application information (application.ini) available → [mozrunner] Make application information (application.ini) available
See also https://bugzilla.mozilla.org/show_bug.cgi?id=830430#c21 ; So we have a few options of where to put this:

- mozinfo : a bit heavy-handed; also, it'd be nice (but not mandatory) to get bug 707976 done first if we put it here

- mozrunner: sorta fits; but since mozrunner depends on mozprofile and not vice versa, this is a no go if we do use this in mozprofile (which may not be necessary/appropriate...maybe mozrunner invokes mozprofile according to this)

- its own package: not a horrible idea, but also yet another package.

Considering again, after writing this, I will again support mozrunner and propose that the runner is in charge of deciding what set(s) of preferences are sent to the profile and that the profile knows nothing of this.
Hello guys,

There is a problem with application.ini since Firefox/Thunderbird 11 and SeaMonkey 2.8.

Can you read : https://bugzilla.mozilla.org/show_bug.cgi?id=723493 and resolve this bug?

I would like to use new versions.
Hi, please don't post the same comment in multiple bugs.
(In reply to Neustradamus from comment #5)
> Hello guys,
> 
> There is a problem with application.ini since Firefox/Thunderbird 11 and
> SeaMonkey 2.8.
> 
> Can you read : https://bugzilla.mozilla.org/show_bug.cgi?id=723493 and
> resolve this bug?
> 
> I would like to use new versions.

What Te(In reply to Neustradamus from comment #5)
> Hello guys,
> 
> There is a problem with application.ini since Firefox/Thunderbird 11 and
> SeaMonkey 2.8.
> 
> Can you read : https://bugzilla.mozilla.org/show_bug.cgi?id=723493 and
> resolve this bug?
> 
> I would like to use new versions.

What Ted said.  Noting for posterity that the bug mentioned has essentially nothing to do with this bug.  By my guesstimation thats 3 comments x 10+ email notifications of noise for this bug alone.
Blocks: 891337
Severity: normal → enhancement
I think all what has been requested here has been done via bug 928452. We now have a mozversion package! Hurray.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.