Bug 811404 - Include C++ unit tests and harness in test package. r=ted

This commit is contained in:
Dan Minor (dminor@mozilla.com) 2013-06-14 13:07:34 -04:00
parent cab89f1be3
commit 3d36dc133c
3 changed files with 17 additions and 2 deletions

View File

@ -159,10 +159,14 @@ ifdef CPP_UNIT_TESTS
# through TestHarness.h, by modifying the list of includes and the libs against
# which stuff links.
CPPSRCS += $(CPP_UNIT_TESTS)
SIMPLE_PROGRAMS += $(CPP_UNIT_TESTS:.cpp=$(BIN_SUFFIX))
CPP_UNIT_TEST_BINS := $(CPP_UNIT_TESTS:.cpp=$(BIN_SUFFIX))
SIMPLE_PROGRAMS += $(CPP_UNIT_TEST_BINS)
INCLUDES += -I$(DIST)/include/testing
LIBS += $(XPCOM_GLUE_LDOPTS) $(NSPR_LIBS) $(MOZ_JS_LIBS) $(if $(JS_SHARED_LIBRARY),,$(MOZ_ZLIB_LIBS))
libs:: $(CPP_UNIT_TEST_BINS) $(call mkdir_deps,$(DIST)/cpptests)
$(NSINSTALL) $(CPP_UNIT_TEST_BINS) $(DIST)/cpptests
check::
@$(PYTHON) $(topsrcdir)/testing/runcppunittests.py --xre-path=$(DIST)/bin --symbols-path=$(DIST)/crashreporter-symbols $(subst .cpp,$(BIN_SUFFIX),$(CPP_UNIT_TESTS))

View File

@ -159,10 +159,14 @@ ifdef CPP_UNIT_TESTS
# through TestHarness.h, by modifying the list of includes and the libs against
# which stuff links.
CPPSRCS += $(CPP_UNIT_TESTS)
SIMPLE_PROGRAMS += $(CPP_UNIT_TESTS:.cpp=$(BIN_SUFFIX))
CPP_UNIT_TEST_BINS := $(CPP_UNIT_TESTS:.cpp=$(BIN_SUFFIX))
SIMPLE_PROGRAMS += $(CPP_UNIT_TEST_BINS)
INCLUDES += -I$(DIST)/include/testing
LIBS += $(XPCOM_GLUE_LDOPTS) $(NSPR_LIBS) $(MOZ_JS_LIBS) $(if $(JS_SHARED_LIBRARY),,$(MOZ_ZLIB_LIBS))
libs:: $(CPP_UNIT_TEST_BINS) $(call mkdir_deps,$(DIST)/cpptests)
$(NSINSTALL) $(CPP_UNIT_TEST_BINS) $(DIST)/cpptests
check::
@$(PYTHON) $(topsrcdir)/testing/runcppunittests.py --xre-path=$(DIST)/bin --symbols-path=$(DIST)/crashreporter-symbols $(subst .cpp,$(BIN_SUFFIX),$(CPP_UNIT_TESTS))

View File

@ -399,6 +399,7 @@ package-tests: \
stage-tps \
stage-modules \
stage-marionette \
stage-cpptests \
$(NULL)
else
# This staging area has been built for us by universal/flight.mk
@ -486,6 +487,12 @@ stage-modules: make-stage-dir
$(NSINSTALL) -D $(PKG_STAGE)/modules
cp -RL $(DEPTH)/_tests/modules $(PKG_STAGE)
stage-cpptests:
$(NSINSTALL) -D $(PKG_STAGE)/cpptests
$(NSINSTALL) $(topsrcdir)/testing/runcppunittests.py $(PKG_STAGE)/cpptests
$(NSINSTALL) $(topsrcdir)/testing/remotecppunittests.py $(PKG_STAGE)/cpptests
cp -RL $(DIST)/cpptests $(PKG_STAGE)
MARIONETTE_DIR=$(PKG_STAGE)/marionette
stage-marionette: make-stage-dir
$(NSINSTALL) -D $(MARIONETTE_DIR)/tests