Visit Mozilla.org

XPCSHELL TESTS

From MDC

XPCSHELL_TESTS is a makefile variable indicating the location of xpcshell-based tests for the Mozilla code in that directory. XPCSHELL_TESTS should be set to a list of directories containing such tests (or to just one, if you wish to keep all tests in one directory).

[edit] Set by

Tree makefiles set XPCSHELL_TESTS after including autoconf.mk but before including rules.mk. MODULE must also be set in conjunction with XPCSHELL_TESTS.

[edit] Examples

To designate the directory unit as containing xpcshell tests:

# the usual preamble of topsrcdir, DEPTH, etc. goes here

include $(DEPTH)/config/autoconf.mk

MODULE = module_name

XPCSHELL_TESTS = unit

include $(topsrcdir)/config/rules.mk

To designate the directories foo, bar, and baz as containing xpcshell tests:

# The usual preamble of topsrcdir, DEPTH, etc. goes here

include $(DEPTH)/config/autoconf.mk

MODULE = module_name

# Note: this line-continuation style helps with line-based CVS blame -- you could also just do:
# XPCSHELL_TEST = foo bar baz
XPCSHELL_TESTS = \
                 foo \
                 bar \
                 baz \
                 $(NULL)

include $(topsrcdir)/config/rules.mk

[edit] See also