Bug 455813 - Windows PGO builds fail when --disable-tests is set; r=ted.mielczarek
--- a/build/Makefile.in
+++ b/build/Makefile.in
@@ -99,16 +99,22 @@ AUTOMATION_PPARGS += -DIS_CAMINO=1
else
AUTOMATION_PPARGS += -DIS_CAMINO=0
endif
ifeq ($(host_os), cygwin)
AUTOMATION_PPARGS += -DIS_CYGWIN=1
endif
+ifeq ($(ENABLE_TESTS), 1)
+AUTOMATION_PPARGS += -DIS_TEST_BUILD=1
+else
+AUTOMATION_PPARGS += -DIS_TEST_BUILD=0
+endif
+
_LEAKTEST_DIR = $(DEPTH)/_leaktest
_LEAKTEST_FILES = \
automation.py \
leaktest.py \
bloatcycle.html \
$(topsrcdir)/build/pgo/server-locations.txt \
$(NULL)
--- a/build/pgo/Makefile.in
+++ b/build/pgo/Makefile.in
@@ -103,16 +103,22 @@ AUTOMATION_PPARGS += -DIS_CAMINO=1
else
AUTOMATION_PPARGS += -DIS_CAMINO=0
endif
ifeq ($(host_os), cygwin)
AUTOMATION_PPARGS += -DIS_CYGWIN=1
endif
+ifeq ($(ENABLE_TESTS), 1)
+AUTOMATION_PPARGS += -DIS_TEST_BUILD=1
+else
+AUTOMATION_PPARGS += -DIS_TEST_BUILD=0
+endif
+
automation.py: automation.py.in
$(PYTHON) $(topsrcdir)/config/Preprocessor.py \
$(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $^ > $@
genpgocert.py: genpgocert.py.in
$(PYTHON) $(topsrcdir)/config/Preprocessor.py \
$(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $^ > $@
--- a/build/pgo/automation.py.in
+++ b/build/pgo/automation.py.in
@@ -78,16 +78,17 @@ IS_CYGWIN = False
#endif
#expand IS_CAMINO = __IS_CAMINO__ != 0
#expand BIN_SUFFIX = __BIN_SUFFIX__
UNIXISH = not IS_WIN32 and not IS_MAC
#expand DEFAULT_APP = "./" + __BROWSER_PATH__
#expand CERTS_DIR = __CERTS_DIR__
+#expand IS_TEST_BUILD = __IS_TEST_BUILD__
###########
# LOGGING #
###########
# We use the logging system here primarily because it'll handle multiple
# threads, which is needed to process the output of the server and application
# processes simultaneously.
@@ -438,25 +439,27 @@ def environment(env = None):
return env
###############
# RUN THE APP #
###############
def runApp(testURL, env, app, profileDir, extraArgs):
- # create certificate database for the profile
- certificateStatus = fillCertificateDB(profileDir)
- if certificateStatus != 0:
- log.info("ERROR FAIL Certificate integration")
- return certificateStatus
-
- ssltunnel = DIST_BIN + "/ssltunnel" + BIN_SUFFIX
- ssltunnelProcess = Process(ssltunnel, [os.path.join(CERTS_DIR, "ssltunnel.cfg")], environment())
- log.info("SSL tunnel pid: %d", ssltunnelProcess.pid)
+ if (IS_TEST_BUILD):
+ # create certificate database for the profile
+ certificateStatus = fillCertificateDB(profileDir)
+ if certificateStatus != 0:
+ log.info("ERROR FAIL Certificate integration")
+ return certificateStatus
+
+ # start ssltunnel to provide https:// URLs capability
+ ssltunnel = DIST_BIN + "/ssltunnel" + BIN_SUFFIX
+ ssltunnelProcess = Process(ssltunnel, [os.path.join(CERTS_DIR, "ssltunnel.cfg")], environment())
+ log.info("SSL tunnel pid: %d", ssltunnelProcess.pid)
"Run the app, returning the time at which it was started."
# mark the start
start = datetime.now()
# now run with the profile we created
cmd = app
if IS_MAC and not IS_CAMINO and not cmd.endswith("-bin"):
@@ -479,11 +482,12 @@ def runApp(testURL, env, app, profileDir
args.append((testURL))
args.extend(extraArgs)
proc = Process(cmd, args, env = environment(env))
log.info("Application pid: %d", proc.pid)
status = proc.wait()
if status != 0:
log.info("ERROR FAIL Exited with code %d during test run", status)
- ssltunnelProcess.kill()
+ if (IS_TEST_BUILD):
+ ssltunnelProcess.kill()
return start
--- a/testing/mochitest/Makefile.in
+++ b/testing/mochitest/Makefile.in
@@ -115,16 +115,22 @@ TEST_DRIVER_PPARGS += -DIS_CAMINO=1
else
TEST_DRIVER_PPARGS += -DIS_CAMINO=0
endif
ifeq ($(host_os), cygwin)
TEST_DRIVER_PPARGS += -DIS_CYGWIN=1
endif
+ifeq ($(ENABLE_TESTS), 1)
+AUTOMATION_PPARGS += -DIS_TEST_BUILD=1
+else
+AUTOMATION_PPARGS += -DIS_TEST_BUILD=0
+endif
+
runtests.py: runtests.py.in
$(PYTHON) $(topsrcdir)/config/Preprocessor.py \
$(TEST_DRIVER_PPARGS) $(DEFINES) $(ACDEFINES) $^ > $@
automation.py: $(topsrcdir)/build/pgo/automation.py.in
$(PYTHON) $(topsrcdir)/config/Preprocessor.py \
$(TEST_DRIVER_PPARGS) $(DEFINES) $(ACDEFINES) $^ > $@