Remote cpp unit tests: make target for running all tests in a directory

RESOLVED FIXED in mozilla20

Status

Testing
General
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: gbrown, Assigned: gbrown)

Tracking

unspecified
mozilla20
x86
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Assignee)

Updated

6 years ago
Depends on: 811411
(Assignee)

Comment 1

6 years ago
Created attachment 693536 [details] [diff] [review]
allow make -C <dir> cppunittests-remote

This seems to work for me. I tested with:

make -C xpcom/tests cppunittests-remote
make -C netwerk/test cppunittests-remote
Assignee: nobody → gbrown
Attachment #693536 - Flags: review?(ted)
Comment on attachment 693536 [details] [diff] [review]
allow make -C <dir> cppunittests-remote

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

r=me with a few changes.

::: config/rules.mk
@@ +107,5 @@
>  
>  check::
>  	@$(PYTHON) $(topsrcdir)/testing/runcppunittests.py --xre-path=$(DIST)/bin --symbols-path=$(DIST)/crashreporter-symbols $(subst .cpp,$(BIN_SUFFIX),$(CPP_UNIT_TESTS))
>  
> +REMOTE_CPPUNITTESTS = \

If we're not reusing this anywhere there's not much point in defining it in a variable.

@@ +108,5 @@
>  check::
>  	@$(PYTHON) $(topsrcdir)/testing/runcppunittests.py --xre-path=$(DIST)/bin --symbols-path=$(DIST)/crashreporter-symbols $(subst .cpp,$(BIN_SUFFIX),$(CPP_UNIT_TESTS))
>  
> +REMOTE_CPPUNITTESTS = \
> +	rm -f ./$@.log && \

You don't need the logging bits here.

@@ +111,5 @@
> +REMOTE_CPPUNITTESTS = \
> +	rm -f ./$@.log && \
> +	$(PYTHON) -u $(topsrcdir)/config/pythonpath.py \
> +	  -I$(topsrcdir)/build \
> +	  -I$(topsrcdir)/testing/mozbase/mozdevice/mozdevice \

You shouldn't need to use pythonpath here, these things should all be in the Python virtualenv nowadays. Drop pythonpath.py and the -I bits.

@@ +114,5 @@
> +	  -I$(topsrcdir)/build \
> +	  -I$(topsrcdir)/testing/mozbase/mozdevice/mozdevice \
> +	  $(topsrcdir)/testing/remotecppunittests.py \
> +	  --xre-path=$(DEPTH)/dist/bin \
> +	  --localLib=$(DEPTH)/dist/fennec \

This probably wants to be $(MOZ_APP_NAME) instead of hardcoding fennec.
Attachment #693536 - Flags: review?(ted) → review+
(Assignee)

Comment 3

6 years ago
Created attachment 694644 [details] [diff] [review]
allow make -C <dir> cppunittests-remote

Updated for review comments. r=ted 

Thanks for the great feedback -- this is much tidier!
Attachment #693536 - Attachment is obsolete: true
Attachment #694644 - Flags: review+
(Assignee)

Comment 4

6 years ago
Created attachment 694648 [details] [diff] [review]
allow make -C <dir> cppunittests-remote

D'oh! Attached the wrong patch.
Attachment #694644 - Attachment is obsolete: true
Attachment #694648 - Flags: review+
(Assignee)

Comment 5

6 years ago
Created attachment 697465 [details] [diff] [review]
allow make -C <dir> cppunittests-remote

Re-based for new patch on bug 811411.
Attachment #694648 - Attachment is obsolete: true
Attachment #697465 - Flags: review+

Comment 7

6 years ago
https://hg.mozilla.org/mozilla-central/rev/354fcf80053a
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.