From eefdd97dff765f6a34a0ce14af27b11c09059471 Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Fri, 11 Nov 2011 12:25:22 -0800 Subject: [PATCH] Bug 701822 - Add TEST_DIRS Makefile variable; r=ted --- config/rules.mk | 13 +++++++++++++ js/src/config/rules.mk | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/config/rules.mk b/config/rules.mk index d1b969becd4..4b8ae1f9f7c 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -122,6 +122,19 @@ testxpcobjdir = $(DEPTH)/_tests/xpcshell ifdef ENABLE_TESTS +# Add test directories to the regular directories list. TEST_DIRS should +# arguably have the same status as TOOL_DIRS and other *_DIRS variables. It is +# coded this way until Makefiles stop using the "ifdef ENABLE_TESTS; DIRS +=" +# convention. +# +# The current developer workflow expects tests to be updated when processing +# the default target. If we ever change this implementation, the behavior +# should be preserved or the change should be widely communicated. A +# consequence of not processing test dir targets during the default target is +# that changes to tests may not be updated and code could assume to pass +# locally against non-current test code. +DIRS += $(TEST_DIRS) + ifdef XPCSHELL_TESTS ifndef relativesrcdir $(error Must define relativesrcdir when defining XPCSHELL_TESTS.) diff --git a/js/src/config/rules.mk b/js/src/config/rules.mk index d1b969becd4..4b8ae1f9f7c 100644 --- a/js/src/config/rules.mk +++ b/js/src/config/rules.mk @@ -122,6 +122,19 @@ testxpcobjdir = $(DEPTH)/_tests/xpcshell ifdef ENABLE_TESTS +# Add test directories to the regular directories list. TEST_DIRS should +# arguably have the same status as TOOL_DIRS and other *_DIRS variables. It is +# coded this way until Makefiles stop using the "ifdef ENABLE_TESTS; DIRS +=" +# convention. +# +# The current developer workflow expects tests to be updated when processing +# the default target. If we ever change this implementation, the behavior +# should be preserved or the change should be widely communicated. A +# consequence of not processing test dir targets during the default target is +# that changes to tests may not be updated and code could assume to pass +# locally against non-current test code. +DIRS += $(TEST_DIRS) + ifdef XPCSHELL_TESTS ifndef relativesrcdir $(error Must define relativesrcdir when defining XPCSHELL_TESTS.)