Add support for packaging tests in a specific directory

RESOLVED FIXED in mozilla12

Status

Testing
General
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: gkw, Assigned: jmaher)

Tracking

unspecified
mozilla12
ARM
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

7 years ago
From bug 701076 comment 30 :

Per f2f discussion with tfair, it will be really helpful to add support for packaging tests in a specific directory.

(instead of having the individual files listed in Makefile.in)

bug 701076 comment 31 :

We might not be able to make this work so smoothly, but we will try to make it simpler.  For what :gkw is looking to do, we think it could work for him to generate a set of .java files and put them in the build tree (mobile/android/base/test/), rebuild and run the tests.  

Some issues to resolve:
 * removing the files hardcoded in the makefile.in
 * allowing for specific files to be run via the runtestsremote.py (just run the new files only)
 * figuring out how all this works with the robocop.ini
(Reporter)

Comment 1

7 years ago
workaround via IRC:

jmaherXX: gkw: you can just hack the robocop.ini file for now
jmaherXX: gkw: but we detect all tests in the mobile/android/base/test file
jmaherXX: gkw: put your test file in that folder ^
jmaherXX: then edit the robocop.ini in that folder to just have your tests in there
(Reporter)

Updated

7 years ago
Depends on: 701076
(Assignee)

Comment 2

7 years ago
What would be the goal for resolving this?  Right now we detect all files in the mobile/android/base/tests folder and roll those into robocop.apk.

If you are generating files, could you add them automatically to the robocop.ini file or create a unique .ini file that you could use?  If so, we could work on either:
* specifying which .ini to use for the test
* using keywords or tags in the ini file for filtering
(Reporter)

Comment 3

7 years ago
> If you are generating files, could you add them automatically to the
> robocop.ini file or create a unique .ini file that you could use?  If so, we
> could work on either:
> * specifying which .ini to use for the test
> * using keywords or tags in the ini file for filtering

I'd prefer the first option, it sounds more straightforward.
(Assignee)

Comment 4

7 years ago
Created attachment 586538 [details] [diff] [review]
allow for custom manifest files (1.0)

this patch solves a few problems:
1) allows for --robocop to specify the .ini file used.  This is great as we can now run a set of tests without much hacking.  this also solves a lot of the problems for running mochitests vs talos
2) allow for robocop-path.  This is useful for 'make mochitest-robotium' where we would need to install the robocop.apk
3) allow for test-path.  This allows us to specify a single test inside the manifest file (i.e. robocop.ini).  An example would be --test-path=testLoad
Assignee: nobody → jmaher
Status: NEW → ASSIGNED
Attachment #586538 - Flags: review?(gbrown)
Attachment #586538 - Flags: feedback?(gary)
(Reporter)

Comment 5

7 years ago
Comment on attachment 586538 [details] [diff] [review]
allow for custom manifest files (1.0)

Looks good. It'll be nice to have some documentation (probably separate from this) describing how to run your own tests with robocop too.
Attachment #586538 - Flags: feedback?(gary) → feedback+
Comment on attachment 586538 [details] [diff] [review]
allow for custom manifest files (1.0)

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

Good stuff! I especially appreciate the test-path support -- that will be very helpful.

What is the plan for robocop.apk installation via SUT?
Attachment #586538 - Flags: review?(gbrown) → review+
(Assignee)

Comment 7

7 years ago
thanks, I was trying to give general support to everything.

robocop.apk will be installed as fennec.apk is installed, during the setup steps (in installApp.py).  I left the adb installation in the script so 'make mochitest-robotium' would run smoother.
https://hg.mozilla.org/mozilla-central/rev/aea8ac101dfe
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
You need to log in before you can comment on or make changes to this bug.