Closed Bug 630560 Opened 13 years ago Closed 11 years ago

[mozinfo] Incorrect platform version string for openSUSE

Categories

(Testing :: Mozbase, defect)

All
Linux
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mozillabmw, Assigned: moijes12)

References

()

Details

(Keywords: regression, Whiteboard: [mentor=whimboo][lang=py][good first bug])

Attachments

(2 files, 2 obsolete files)

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.13) Gecko/20101203 SUSE/3.6.13-0.2.1 Firefox/3.6.13
Build Identifier: 1.5.2-rc2

openSUSE 11.4 version string is incorrectly reported as "SuSE 11.4" in
http://mozmill-crowd.brasstacks.mozilla.com/#/general/reports


Reproducible: Always

Steps to Reproduce:
1. mozmill-automation/testrun_general.py --report=$dburl /tmp/firefox/firefox-bin
Actual Results:  
version: SuSE 11.4

Expected Results:  
version: openSUSE 11.4

apart from the community openSUSE version, there is also the commercial SLES (SUSE Linux Enterprise Server - e.g. SLES11-SP1 and SLES10-SP3)
I would say this has been caused by my fix on bug 615008.
Blocks: 615008
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Version: unspecified → Trunk
This appears to be from the patch on
https://bugzilla.mozilla.org/show_bug.cgi?id=615008#c4

> python -c 'import platform; print platform.dist()'
('SuSE', '11.3', 'x86_64')

> python -c 'import platform; print platform.linux_distribution()'
('openSUSE ', '11.3', 'x86_64')
So we should generally use platform.linux_distribution() and only fallback to platform.dist() if this method is not available.
Whiteboard: [mentor=whimboo][lang=py][good first bug]
Venkatesch, are you interested to work on this bug? It's also a good one to get started.
Moijes, thank you for the patch. It would be great if you could verify that it works and send a report to our mozmill-crowd database like:

mozmill-automation/testrun_functional.py --report=http://mozauto.iriscouch.com/mozmill-crowd/ %path_to%firefox%

The automation repository you can find here:
http://hg.mozilla.org/qa/mozmill-automation/

If all that works please request review from me for your attached patch. This can be done in details. Thanks.
Assignee: nobody → moijes12
Status: NEW → ASSIGNED
Hi Henrik

Here is the report in the repository.

http://mozauto.iriscouch.com/mozmill-crowd/ad726b5c70cf80fbf8135edfca133db6

I was able to fix it but the file that needed to be modified was 

/usr/local/lib/python2.7/site-packages/mozmill/__init__.py

So, I'm not quite sure which code needs to be modified. Please guide.
When you have to modify Mozmill itself you might want to have a look at its source code here: https://github.com/mozilla/mozmill. We might not want to fix it for 1.5 or better do not release a new version only because of that change. But Mozmill to has to handle it correctly. It's version maps to the master branch of the git repository.
(In reply to moijes from comment #7)
> Hi Henrik
> 
> Here is the report in the repository.
> 
> http://mozauto.iriscouch.com/mozmill-crowd/ad726b5c70cf80fbf8135edfca133db6
> 
> I was able to fix it but the file that needed to be modified was 
> 
> /usr/local/lib/python2.7/site-packages/mozmill/__init__.py
> 
> So, I'm not quite sure which code needs to be modified. Please guide.

When developing, you should use the setup_development.py script: https://github.com/mozilla/mozmill/blob/hotfix-1.5/setup_development.py . This will install the packages via `python setup.py develop` instead of copying to site-packages: http://packages.python.org/distribute/setuptools.html#development-mode
Hi

I've been following the below steps while working with the mozmill
1. virtualenv mozmill
2. cd mozmill
3. . bin/activate
4. mkdir src
5. cd src
6. git clone http://github.com/mozilla/mozmill.git
7. cd mozmill
8. ./setup_development.py
9. cd ../..
10. pip install mozmill --no-install --src=./src
11. pip install mozmill --no-download --src=./src

I did steps 9, 10 and 11 because without them the mozmill-automation/testrun_remote.py and other tests would not run. They would give error like no attribute mozmill.restart or thunderbird.restart etc. I have to run the mozmill-automation scripts in order to verify my corrections.
Also, to run steps 9, 10 and 11, I would exit the current shell (one activated by bin/activate).
Just a note. You cannot run our mozmill-automation scripts from hg.mozilla.org/mozmill-automation with the master branch of Mozmill which will become Mozmill 2.0. Those testrun scripts only work for Mozmill 1.5.

If you want to test with our scripts you should clone and use the following version of the scripts: https://github.com/whimboo/mozmill-automation. Those will work with Mozmill 2.0.
I am seeing the below error with this new automation repository

# bin/testrun_functional /usr/lib/firefox/firefox --report=stdout
*** Application: Firefox 18.0
*** Platform: Linux SuSE 12.1 32bit
Preparing mozmill-tests repository...
requesting all changes
adding changesets
adding manifests
adding file changes
added 2937 changesets with 7744 changes to 770 files (+5 heads)
updating to branch default
404 files updated, 0 files merged, 0 files removed, 0 files unresolved
pulling from http://hg.mozilla.org/qa/mozmill-tests
searching for changes
no changes found
87 files updated, 0 files merged, 9 files removed, 0 files unresolved
*** nss-shared-helper: Shared database disabled (set NSS_USE_SHARED_DB to enable).
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
kbuildsycoca4 running...
Traceback (most recent call last):
  File "/home/otv/Programming/mozmill/lib/python2.7/site-packages/mozmill_automation-0.1-py2.7.egg/mozmill_automation/testrun.py", line 264, in run
    self.run_tests()
  File "/home/otv/Programming/mozmill/lib/python2.7/site-packages/mozmill_automation-0.1-py2.7.egg/mozmill_automation/testrun.py", line 379, in run_tests
    TestRun.run_tests(self)
  File "/home/otv/Programming/mozmill/lib/python2.7/site-packages/mozmill_automation-0.1-py2.7.egg/mozmill_automation/testrun.py", line 216, in run_tests
    self._mozmill.run(tests, self.options.restart)
  File "/home/otv/Programming/mozmill/src/mozmill/mozmill/mozmill/__init__.py", line 393, in run
    frame = self.run_test_file(frame or self.start_runner(),
  File "/home/otv/Programming/mozmill/src/mozmill/mozmill/mozmill/__init__.py", line 313, in start_runner
    self.create_network()
  File "/home/otv/Programming/mozmill/src/mozmill/mozmill/mozmill/__init__.py", line 273, in create_network
    self.jsbridge_port)
  File "/home/otv/Programming/mozmill/src/mozmill/jsbridge/jsbridge/__init__.py", line 44, in wait_and_create_network
    raise Exception("Cannot connect to jsbridge extension, port %s" % port)
Exception: Cannot connect to jsbridge extension, port 53095
So I would skip that verification check with our testrun scripts for now. It's not necessary to get this bug fixed. Just run plain mozmill with the --report option and check the platform entry. You can store the report to the local disk via --report=file://report.json.
The modifications done are the same as in the previous patch with the exception that the file was different.
lib/python2.7/site-packages/mozinfo-0.3.3-py2.7.egg/mozinfo.py is actually mozmill/lib/python2.7/site-packages/mozinfo-0.3.3-py2.7.egg/mozinfo.py and not /usr/lib
Ok, looks good. So it would even be easier to do now. The repository you have to work with is: https://github.com/mozilla/mozbase

mozinfo is located there as a sub module. Once we got this updated and released on PyPI we can update our automation-script for the new mozinfo version and we will also have it for our tests with Mozmill 1.5.

Moving to mozbase given that this is not Mozmill related code.
Component: Mozmill → Mozbase
Summary: incorrect openSUSE 11.4 version string → [mozinfo] Incorrect platform version string for openSUSE
Attached patch Patch built against mozbase. (obsolete) — Splinter Review
I used the steps available in https://wiki.mozilla.org/Auto-tools/Projects/MozBase and the patch was built after running the tests.
Attachment #705984 - Attachment is obsolete: true
Attachment #710161 - Attachment is obsolete: true
I'm a little confused by what got generated by my previous steps. I built this patch by simply running "git diff > bug-630560.diff" in mozbase/src/mozbase.
Attachment #710252 - Attachment is obsolete: true
Comment on attachment 710257 [details] [diff] [review]
Patch built against mozbase.

Thanks for the patch! I will have a look at probably tomorrow.
Attachment #710257 - Flags: review?(hskupin)
Comment on attachment 710257 [details] [diff] [review]
Patch built against mozbase.

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

Looks fine! Thanks for the patch.
Attachment #710257 - Flags: review?(hskupin) → review+
Comment on attachment 705984 [details] [diff] [review]
Made a fix on what I could find in mozmill-automation. Guidance would be appreciated.

I think we can also land this in our mozmill-automation repository without having to file a new bug for it.

Landed as:
http://hg.mozilla.org/qa/mozmill-automation/rev/0cfacc095e72

Bernhard, you might want to update your copy of mozmill-automation if that's not getting done automatically. Starting from now on we should see OpenSUSE in our dashboard.
Attachment #705984 - Attachment is obsolete: false
Attachment #705984 - Flags: review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: