Closed Bug 909839 Opened 11 years ago Closed 10 years ago

Merge JavaScript 'atoms' used by gaia and gaiatest

Categories

(Firefox OS Graveyard :: Gaia, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(firefox28 fixed, b2g-v1.2 wontfix)

RESOLVED FIXED
Tracking Status
firefox28 --- fixed
b2g-v1.2 --- wontfix

People

(Reporter: davehunt, Assigned: davehunt)

References

Details

Attachments

(1 file, 1 obsolete file)

Once bug 909718 is fixed we should merge the atoms used by gaia and gaiatest as these have diverged.
Assignee: nobody → dave.hunt
Are the atoms in https://github.com/mozilla-b2g/gaia/tree/master/tests/atoms still used? I believe they were for the old integration and performance tests. If they're no longer used, I suspect we can simply delete them.
Flags: needinfo?(jlal)
Flags: needinfo?(felash)
I don't know, Hubert would know better by now.
Flags: needinfo?(felash) → needinfo?(hub)
I do use tests/atoms/gaia_lock_screen.js for the |make test-perf|
Flags: needinfo?(hub)
There's just a minor difference between gaia_lock_screen.js in the two atoms folders, so if that's the only one in use we can probably just replace the other files in /tests/atoms with /tests/python/gaia-ui-tests/gaiatest/atoms and make gaiatest copy in from the /tests/atoms path. If there's no objections I'll work on this soon.
Now that I landed bug 915156 on master, you can see what I'm using and what I'm not.

I'm also open to any refactoring to share as much as possible. Don't hesitate to ask me if you need more information.
(In reply to Hubert Figuiere [:hub] from comment #5)
> Now that I landed bug 915156 on master, you can see what I'm using and what
> I'm not.
> 
> I'm also open to any refactoring to share as much as possible. Don't
> hesitate to ask me if you need more information.

Thanks Hubert, I have a patch ready that I'm testing but so far it looks good. I'll flag you for review as well as a gaia-ui-tests peer.
Flags: needinfo?(jlal)
Attachment #8344049 - Flags: review?(zcampbell)
Attachment #8344049 - Flags: review?(jgriffin)
Attachment #8344049 - Flags: review?(hub)
Comment on attachment 8344049 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/14477

r+ in the fact that it doesn't touch anything from |make test-perf|

I haven't seen anything else obvious to comment on.
Attachment #8344049 - Flags: review?(hub) → review+
Attachment #8344049 - Flags: review?(jgriffin) → review+
Comment on attachment 8344049 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/14477

r+
Attachment #8344049 - Flags: review?(zcampbell) → review+
Landed in:
https://github.com/mozilla-b2g/gaia/commit/2c09f900a6bd9c07891f58027ffab54ad3c176e9 (master)

This doesn't apply cleanly to v1.2, but I don't think it's necessary to uplift it.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
This was backed out for causing a failure on TBPL:

https://tbpl.mozilla.org/php/getParsedLog.php?id=31743607&tree=B2g-Inbound

05:50:39     INFO -  Unpacking /builds/slave/test/gaia/tests/python/gaia-ui-tests
05:50:39     INFO -    Running setup.py egg_info for package from file:///builds/slave/test/gaia/tests/python/gaia-ui-tests
05:50:39    ERROR -      Traceback (most recent call last):
05:50:39     INFO -        File "<string>", line 14, in <module>
05:50:39     INFO -        File "/tmp/pip-L0VAOG-build/setup.py", line 34, in <module>
05:50:39     INFO -          raise Exception('JS atoms not found in %s or %s!' % (jsdir, pythondir))
05:50:39     INFO -      Exception: JS atoms not found in /tmp/pip-L0VAOG-build/../../atoms or /tmp/pip-L0VAOG-build/gaiatest/atoms!

It seems it's looking for the atoms in a tmp path instead of the gaia repo. Jonathan, any ideas?
Status: RESOLVED → REOPENED
Flags: needinfo?(jgriffin)
Resolution: FIXED → ---
The mozharness script installs using 'pip install...' which causes the Python package to be copied to a temp dir before running setup.py.   This breaks the assumptions in setup.py about the JS atoms being in ../../atoms.

The solution is to make the mozharness script call 'setup.py develop' on gaiatest, instead of installing via 'pip install'.  I'll try to find time to do this soon.
Flags: needinfo?(jgriffin)
(In reply to Jonathan Griffin (:jgriffin) from comment #12)
> The mozharness script installs using 'pip install...' which causes the
> Python package to be copied to a temp dir before running setup.py.   This
> breaks the assumptions in setup.py about the JS atoms being in ../../atoms.
> 
> The solution is to make the mozharness script call 'setup.py develop' on
> gaiatest, instead of installing via 'pip install'.  I'll try to find time to
> do this soon.

This is actually a bit more complicated than I thought.  The version pinning mechanism implemented in bug 943008 is incompatible with the need for setup.py to copy the JS atoms from an external directory.  I think we'll need to come up with an alternate solution for that, before we can merge these atoms. :(
needinfo'ing myself so I can remember to look into this
Flags: needinfo?(jgriffin)
Hmm, it appears this may work if we change 'pip install -r foo.txt .' to 'pip install -r foo.txt -e .'.
Depends on: 948788
After bug 948788 makes it into production, it should be safe to land this again.
Flags: needinfo?(jgriffin)
Updated and resubmitting now that the blocking bug is resolved.
Attachment #8344049 - Attachment is obsolete: true
Attachment #8365983 - Flags: review?(zcampbell)
Attachment #8365983 - Flags: review?(jgriffin)
Local testing against my device has been successful, but I've also triggered an ad-hoc run to see how this goes in Jenkins: http://qa-selenium.mv.mozilla.com:8080/view/B2G%20Hamachi/job/b2g.hamachi.mozilla-central.ui.adhoc/125/
The launch does not appear to be a happy bunny :(
Comment on attachment 8365983 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/15731

Nope, it looks pretty bad. I'll cancel review requests for now.
Attachment #8365983 - Flags: review?(zcampbell)
Attachment #8365983 - Flags: review?(jgriffin)
I found and fixed the issue. Running an adhoc build again to see the results before re-requesting review:
http://qa-selenium.mv.mozilla.com:8080/view/B2G Hamachi/job/b2g.hamachi.mozilla-central.ui.adhoc/127/
Comment on attachment 8365983 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/15731

The adhoc build looks good. Offering up for review.
Attachment #8365983 - Flags: review?(zcampbell)
Attachment #8365983 - Flags: review?(jgriffin)
Attachment #8365983 - Flags: review?(jgriffin) → review+
Comment on attachment 8365983 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/15731

I am no js guru but I've reviewed the failures and they don't appear to be related. I know this is the worst kind of review but I trust jgriffin has approved the js part!
Attachment #8365983 - Flags: review?(zcampbell) → review+
Status: REOPENED → RESOLVED
Closed: 11 years ago10 years ago
Resolution: --- → FIXED
I've found that the 'atoms' would get no update even after rebase because the ignore file. And it is still used by gaia-ui-test, therefore they would cause the tests failed when these atoms contain errors. It's really strange to fix bugs inside this ignored directory, which seems deprecated or near deprecated by this bug.

I don't know if this is my own problem or not. I'll keep trying to solve the problem.
OK. After remove gaia/tests completely and rebase again, the problem seems disappeared.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: