Closed Bug 775281 Opened 7 years ago Closed 7 years ago

Add xpcshell tests to test.sh

Categories

(Firefox OS Graveyard :: General, defect)

x86
macOS
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mihneadb, Assigned: marshall)

Details

Attachments

(3 files, 6 obsolete files)

Currently, test.sh just runs marionette tests.  We should change it so
that if you run it without args, it prints out possible targets (like
config.sh does now): currently, marionette and xpcshell.  Then, it can
run xpcshell tests if appropriate, or call the existing code to run
marionette tests.
Assignee: nobody → mbalaur
Attachment #643651 - Flags: feedback?(jgriffin)
Attached patch patch for the m-c repo (obsolete) — Splinter Review
Attachment #643653 - Flags: feedback?(jgriffin)
Comment on attachment 643653 [details] [diff] [review]
patch for the m-c repo

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

Looks good.  Let's change the name to b2g_xpcshell_venv.sh, to make it more descriptive.  I think we should also check and see if $XPCSHELLTEST_HOME and $MARIONETTE_HOME are set, and bail if it isn't (i.e., if the user invoked this script directly instead of via test.sh).
Attachment #643653 - Flags: feedback?(jgriffin) → feedback+
Comment on attachment 643651 [details] [diff] [review]
patch for the test.sh file in the B2G repo

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

lgtm
Attachment #643651 - Flags: feedback?(jgriffin) → feedback+
Attachment #643653 - Attachment is obsolete: true
Attachment #644075 - Flags: review?(jgriffin)
Attachment #643651 - Attachment is obsolete: true
Attachment #644077 - Flags: review?(jgriffin)
Attachment #644077 - Attachment is patch: true
Comment on attachment 644075 [details] [diff] [review]
adapt m-c files to support running xpcshell tests from test.sh

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

Looks good with one tiny nit!

::: testing/xpcshell/runtestsb2g.py
@@ +20,5 @@
>  
>  class B2GXPCShellRemote(XPCShellRemote):
>  
> +    def __init__(self, devmgr, options, args):
> +        self.use_device_libs = options.use_device_libs  # Has to be done before

I don't think is necessary, since XPCShellRemote sets self.options = options in the first line.  You could just reference self.options.use_device_libs everywhere instead, to be more consistent with the existing code.
Attachment #644075 - Flags: review?(jgriffin) → review+
Attachment #644077 - Flags: review?(jgriffin) → review+
carrying forward r+ from :jgriffin.

You were right, no need to save that attr separately.
Attachment #644075 - Attachment is obsolete: true
Attachment #644512 - Flags: review+
Assignee: mihneadb → marshall
Attached patch part 1: frontend fixes - v1 (obsolete) — Splinter Review
Taking over this bug with new patches based on recent xpcshell work in B2G
Attachment #644077 - Attachment is obsolete: true
Attachment #644512 - Attachment is obsolete: true
Attachment #699731 - Flags: review?(jgriffin)
Attachment #699735 - Flags: review?(dhylands)
the original patch made other test frontends fail, apparently we're using different
versions of mozhttpd / moznetwork? Since it isn't clear, I'm covering both cases
for get_lan_ip in this patch.
Attachment #699731 - Attachment is obsolete: true
Attachment #699731 - Flags: review?(jgriffin)
Attachment #699850 - Flags: review?(jgriffin)
Attachment #699850 - Flags: review?(jgriffin) → review+
Attachment #699735 - Flags: review?(dhylands) → review+
Attachment #699734 - Flags: review?(dhylands) → review+
Drive-by: This appears to reinvent something we already have in m-c, the |mach xpcshell-test| command (https://hg.mozilla.org/mozilla-central/file/default/testing/xpcshell/mach_commands.py). I'd like to encourage the B2G folk to reach out to m-c folk so we can mend the existing wheel to work for everybody instead of reinventing it over and over. If we continue down this dual path, I fear we're just creating engineering debt and divergence of tools, neither of which are good for productivity.
https://hg.mozilla.org/mozilla-central/rev/4b91cf1b0430
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.