Bug 548207 - allow make check to run over remote connection from devicemanager.py; (Cv2-CC) Port (the useful part of) it to comm-central, (partly m-1.9.2+).
authorSerge Gautherie <sgautherie.bz@free.fr>
Sat, 27 Mar 2010 16:48:52 +0100
changeset 5295 e1441916999b62ecc861f084c3f93309962c8e47
parent 5294 6fc18bfdf0574289ae8de132e212525f8261a962
child 5296 a4617f9d05e3c1f95892237630a7d383807266f2
push idunknown
push userunknown
push dateunknown
bugs548207
Bug 548207 - allow make check to run over remote connection from devicemanager.py; (Cv2-CC) Port (the useful part of) it to comm-central, (partly m-1.9.2+). r=Callek.
config/config.mk
config/rules.mk
--- a/config/config.mk
+++ b/config/config.mk
@@ -843,20 +843,26 @@ ifdef LOCALE_MERGEDIR
 MAKE_JARS_FLAGS += -c $(LOCALE_MERGEDIR)/$(subst /locales,,$(relativesrcdir))
 endif
 MAKE_JARS_FLAGS += -c $(LOCALE_SRCDIR)
 ifdef LOCALE_MERGEDIR
 MAKE_JARS_FLAGS += -c $(topsrcdir)/$(relativesrcdir)/en-US
 endif
 endif
 
-ifeq (,$(filter WINCE WINNT OS2,$(OS_ARCH)))
+ifdef WINCE
+ifndef MOZILLA_1_9_2_BRANCH
+RUN_TEST_PROGRAM = $(PYTHON) $(MOZILLA_SRCDIR)/build/mobile/devicemanager-run-test.py
+endif # ! MOZILLA_1_9_2_BRANCH
+else
+ifeq (OS2,$(OS_ARCH))
+RUN_TEST_PROGRAM = $(MOZILLA_SRCDIR)/build/os2/test_os2.cmd "$(DIST)"
+else
+ifneq (WINNT,$(OS_ARCH))
 RUN_TEST_PROGRAM = $(DIST)/bin/run-mozilla.sh
-endif
-
-ifeq ($(OS_ARCH),OS2)
-RUN_TEST_PROGRAM = $(MOZILLA_SRCDIR)/build/os2/test_os2.cmd "$(DIST)"
-endif
+endif # ! WINNT
+endif # ! OS2
+endif # ! WINCE
 
 ifdef TIERS
 DIRS += $(foreach tier,$(TIERS),$(tier_$(tier)_dirs))
 STATIC_DIRS += $(foreach tier,$(TIERS),$(tier_$(tier)_staticdirs))
 endif
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -199,17 +199,17 @@ ifdef CPP_UNIT_TESTS
 CPPSRCS += $(CPP_UNIT_TESTS)
 SIMPLE_PROGRAMS += $(CPP_UNIT_TESTS:.cpp=$(BIN_SUFFIX))
 REQUIRES += testing xpcom
 LIBS += $(XPCOM_GLUE_LDOPTS) $(NSPR_LIBS)
 
 # ...and run them the usual way
 check::
 	@$(EXIT_ON_ERROR) \
-	  for f in $(subst .cpp,,$(CPP_UNIT_TESTS)); do \
+	  for f in $(subst .cpp,$(BIN_SUFFIX),$(CPP_UNIT_TESTS)); do \
 	    XPCOM_DEBUG_BREAK=stack-and-abort $(RUN_TEST_PROGRAM) $(DIST)/bin/$$f; \
 	  done
 
 endif # CPP_UNIT_TESTS
 
 .PHONY: check xpcshell-tests check-interactive check-one
 
 endif # ENABLE_TESTS
@@ -1096,17 +1096,21 @@ endif
 # in one directory, it assumes everything to compile Foo is in
 # Foo.o (from either Foo.c or Foo.cpp).
 #
 # SIMPLE_PROGRAMS = Foo Bar
 # creates Foo.o Bar.o, links with LIBS to create Foo, Bar.
 #
 $(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(LIBS_DEPS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
 ifeq (WINCE,$(OS_ARCH))
+  ifdef MOZILLA_1_9_2_BRANCH
 	$(LD) -nologo  -entry:main -out:$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
+  else
+	$(LD) -nologo  -entry:mainACRTStartup -out:$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
+  endif
 else
 ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
 	$(LD) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
 ifdef MSMANIFEST_TOOL
 	@if test -f $@.manifest; then \
 		mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
 		rm -f $@.manifest; \
 	fi