Bug 644421: Add |make check| rules: check-jit-test, check-vanilla-new and check-sync-dirs. (r=jimb)
authorPaul Biggar <pbiggar@mozilla.com>
Fri, 01 Apr 2011 21:12:06 -0700
changeset 67905 81e8458e7fbfbd55794789e0b2a38515e6e63292
parent 67904 40d6f9795ecc634fde755772d6003814255c2a8f
child 67906 a008ac5b817c19d07db489e955de5463637ffe21
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimb
bugs644421
milestone2.2a1pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 644421: Add |make check| rules: check-jit-test, check-vanilla-new and check-sync-dirs. (r=jimb)
js/src/Makefile.in
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -549,65 +549,64 @@ ifdef JS_HAS_CTYPES
 # in the right order.
 export::
 		$(call SUBMAKE,,ctypes/libffi)
 
 distclean clean::
 		$(call SUBMAKE,$@,ctypes/libffi)
 endif
 
-ifdef MOZ_SYNC_BUILD_FILES
 # Because the SpiderMonkey can be distributed and built independently
 # of the Mozilla source tree, it contains its own copies of many of
 # the files used by the top-level Mozilla build process, from the
 # 'config' and 'build' subtrees.
 #
 # To make it simpler to keep the copies in sync, we follow the policy
 # that the SpiderMonkey copies must always be exact copies of those in
 # the containing Mozilla tree.  If you've made a change in one, it
 # belongs in the other as well.  If the change isn't right for both
 # places, then that's something to bring up with the other developers.
 #
 # Some files are reasonable to diverge; for  example,
 # js/config/autoconf.mk.in doesn't need most of the stuff in
 # config/autoconf.mk.in.
-check-sync-dirs = $(PYTHON) $(srcdir)/config/check-sync-dirs.py
-check::
-	$(check-sync-dirs) $(srcdir)/config $(MOZ_SYNC_BUILD_FILES)/config
-	$(check-sync-dirs) $(srcdir)/build $(MOZ_SYNC_BUILD_FILES)/build
+check-sync-dirs-cmd = $(PYTHON) $(srcdir)/config/check-sync-dirs.py
+check-sync-dirs:
+	$(check-sync-dirs-cmd) $(srcdir)/config $(MOZ_SYNC_BUILD_FILES)/config
+	$(check-sync-dirs-cmd) $(srcdir)/build $(MOZ_SYNC_BUILD_FILES)/build
 
-check-valgrind::
-	$(check-sync-dirs) $(srcdir)/config $(MOZ_SYNC_BUILD_FILES)/config
-	$(check-sync-dirs) $(srcdir)/build $(MOZ_SYNC_BUILD_FILES)/build
+ifdef MOZ_SYNC_BUILD_FILES
+check:: check-sync-dirs
 endif
 
 # The "find any vanilla new/new[] calls" script is tailored to Linux, so
 # only run it there.  That should be enough to catch any such calls that
 # creep in.
+check-vanilla-new:
+	$(srcdir)/config/find_vanilla_new_calls $(LIBRARY)
+
 ifeq ($(OS_ARCH),Linux)
-check::
-	$(srcdir)/config/find_vanilla_new_calls $(LIBRARY)
+check:: check-vanilla-new
 endif
 
 # Help ensure that the number of OOM errors in SpiderMonkey doesn't increase.
 # If the number of OOM errors changes, update the number below. We intend this
 # number to go down over time, by fixing OOMs.
-ifdef DEBUG
 check-ooms:
 	$(wildcard $(RUN_TEST_PROGRAM)) $(PYTHON) -u $(srcdir)/config/find_OOM_errors.py --regression 125
 
+ifdef DEBUG
 check:: check-ooms
 endif
 
 ## Prevent regressing in our deprecation of non-preferred memory management functions.
 # We use all the files in the distribution so that different configurations
 # don't give different results. We skip the contents of objdirs using |find|
 # (it can't be done with %-expansion, because the files we want to skip aren't
 # in the vpath).
-ifneq ($(OS_ARCH),WINNT) # FIXME: this should be made work on Windows too.
 ALL_FILES=$(shell find $(srcdir) \( -name "*.cpp" -o -name "*.h" \) -not -path "*/dist/*")
 check-malloc-function-usage: $(filter-out %jsutil.h %jscntxt.h, $(ALL_FILES))
 
 	# js_malloc and friends are only used by other memory managers, and should
 	# never be used elsewhere directly.
 	$(srcdir)/config/check_source_count.py "\bjs_malloc\b" 0 \
 		"in Makefile.in" "cx->malloc_ or rt->malloc_" $^
 	$(srcdir)/config/check_source_count.py "\bjs_calloc\b" 0 \
@@ -620,28 +619,32 @@ check-malloc-function-usage: $(filter-ou
 	# We desire these numbers to go down, not up. See "User guide to memory
 	# management within SpiderMonkey" in jsutil.h.
 	$(srcdir)/config/check_source_count.py OffTheBooks:: 54 \
 		"in Makefile.in" "{cx,rt}->{new_,new_array,malloc_,calloc_,realloc_}" $^
 	# This should go to zero, if possible.
 	$(srcdir)/config/check_source_count.py UnwantedForeground:: 36 \
 		"in Makefile.in" "{cx,rt}->{free_,delete_,array_delete}" $^
 
+ifneq ($(OS_ARCH),WINNT) # FIXME: this should be made work on Windows too.
 check:: check-malloc-function-usage
 endif
 
-ifndef WINCE
 JITFLAGS = ,m,j,mj,mjp,am,amj,amjp,amd
-check::
+check-jit-test::
 	$(wildcard $(RUN_TEST_PROGRAM)) $(PYTHON) -u $(srcdir)/jit-test/jit_test.py \
 	        --no-slow --no-progress --tinderbox --jitflags=$(JITFLAGS) $(DIST)/bin/js$(BIN_SUFFIX)
 
-check-valgrind::
+check-jit-test-valgrind::
 	$(wildcard $(RUN_TEST_PROGRAM)) $(PYTHON) -u $(srcdir)/jit-test/jit_test.py \
 	        --valgrind --no-slow --no-progress --tinderbox --jitflags=$(JITFLAGS) $(DIST)/bin/js$(BIN_SUFFIX)
+
+ifndef WINCE
+check:: check-jit-test
+check-valgrind:: check-jit-test-valgrind
 endif
 
 DIST_GARBAGE = config.cache config.log config.status \
    config/autoconf.mk \
    unallmakefiles js-config js-config.h js-confdefs.h
 
 distclean::
 	cat unallmakefiles | $(XARGS) rm -f