Closed Bug 1060940 Opened 5 years ago Closed 5 years ago

mozrunner has a lot of confusing and apparently broken code for getting version information

Categories

(Testing :: Mozbase, defect)

defect
Not set

Tracking

(firefox41 fixed)

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: wlach, Assigned: parkouss)

References

Details

(Keywords: regression)

Attachments

(1 file)

Noticed this while helping Daniel work on bug 1059872. mozrunner has some code to get the version number automatically in the command line client:

http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/mozrunner/mozrunner/cli.py#66

The problem is that this code doesn't actually work. If I run mozrunner --version, here's what I get:

  (mozbase)wlach@popsicle:~/src/mozilla-central-hg$ mozrunner --version
  Usage: mozrunner [options]
  
  mozrunner: error: no such option: --version

There's a lot of hard-to-unwind code in there that seems oriented around getting metadata from the python egg, which isn't even called:

http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/mozrunner/mozrunner/cli.py#116
http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/mozrunner/mozrunner/utils.py#18

I think we should either unwind how this is supposed to work and fix the code, or just take the versioning stuff out altogether. What is it even used for? No one really uses the cli except for random testing stuff AFAIK.
Flags: needinfo?(hskupin)
Flags: needinfo?(ahalberstadt)
I did a quick test locally and all works fine with version 5.37.2. I assume the large refactoring from Andrew for mozrunner 6.0 caused this problem.
Blocks: 997244
Flags: needinfo?(hskupin)
Keywords: regression
OS: Linux → All
Hardware: x86_64 → All
(In reply to Henrik Skupin (:whimboo) from comment #1)
> I did a quick test locally and all works fine with version 5.37.2. I assume
> the large refactoring from Andrew for mozrunner 6.0 caused this problem.

Yeah, most likely. I remember Jeff and I implemented this way back in the pre-mozbase days. I can take a look into fixing it, though tbh I tend to agree with Will that it probably isn't very useful anymore (if it ever was to begin with). Especially when something like 'pip freeze' works just as well.
Flags: needinfo?(ahalberstadt)
Attached patch 1060940.patchSplinter Review
This is broken for me also. I took the chance to remove the code, as it seemed not useful for anybody.
Assignee: nobody → j.parkouss
Status: NEW → ASSIGNED
Attachment #8617399 - Flags: review?(ahalberstadt)
Comment on attachment 8617399 [details] [diff] [review]
1060940.patch

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

Nice, thanks!
Attachment #8617399 - Flags: review?(ahalberstadt) → review+
https://hg.mozilla.org/mozilla-central/rev/43e94edb750b
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.