Closed Bug 821424 Opened 11 years ago Closed 11 years ago

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

Categories

(Testing :: General, defect)

x86
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla20

People

(Reporter: gbrown, Assigned: gbrown)

References

Details

Attachments

(1 file, 3 obsolete files)

Depends on: 811411
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+
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+
D'oh! Attached the wrong patch.
Attachment #694644 - Attachment is obsolete: true
Attachment #694648 - Flags: review+
Re-based for new patch on bug 811411.
Attachment #694648 - Attachment is obsolete: true
Attachment #697465 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/354fcf80053a
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: