diff -r 80ba74046cf1 -r 4f5e0998b6e9 make/InitSupport.gmk --- a/make/InitSupport.gmk Wed Feb 10 22:58:27 2016 +0000 +++ b/make/InitSupport.gmk Thu Feb 11 11:54:00 2016 +0100 @@ -353,14 +353,17 @@ # Parse COMPARE_BUILD into COMPARE_BUILD_* # Syntax: COMPARE_BUILD=CONF=:PATCH=: # MAKE=:COMP_OPTS=: - # COMP_DIR=| + # COMP_DIR=|: + # FAIL= # If neither CONF or PATCH is given, assume means CONF if it # begins with "--", otherwise assume it means PATCH. # MAKE and COMP_OPTS can only be used with CONF and/or PATCH specified. # If any value contains "+", it will be replaced by space. + # FAIL can be set to false to have the return value of compare be ignored. define ParseCompareBuild ifneq ($$(COMPARE_BUILD), ) COMPARE_BUILD_OUTPUT_ROOT := $(TOPDIR)/build/compare-build/$(CONF_NAME) + COMPARE_BUILD_FAIL := true ifneq ($$(findstring :, $$(COMPARE_BUILD)), ) $$(foreach part, $$(subst :, , $$(COMPARE_BUILD)), \ @@ -379,6 +382,9 @@ $$(if $$(filter COMP_DIR=%, $$(part)), \ $$(eval COMPARE_BUILD_COMP_DIR=$$(strip $$(subst +, , $$(patsubst COMP_DIR=%, %, $$(part))))) \ ) \ + $$(if $$(filter FAIL=%, $$(part)), \ + $$(eval COMPARE_BUILD_FAIL=$$(strip $$(subst +, , $$(patsubst FAIL=%, %, $$(part))))) \ + ) \ ) else # Separate handling for single field case, to allow for spaces in values. @@ -402,6 +408,9 @@ $$(error Patch file $$(COMPARE_BUILD_PATCH) does not exist) endif endif + ifneq ($$(COMPARE_BUILD_FAIL), true) + COMPARE_BUILD_IGNORE_RESULT := || true + endif endif endef @@ -443,9 +452,10 @@ $(ECHO) "Comparing between comparison rebuild (this/new) and baseline (other/old)" $(if $(COMPARE_BUILD_COMP_DIR), \ +(cd $(COMPARE_BUILD_OUTPUT_ROOT) && ./compare.sh $(COMPARE_BUILD_COMP_OPTS) \ - -2dirs $(COMPARE_BUILD_OUTPUT_ROOT)/$(COMPARE_BUILD_COMP_DIR) $(OUTPUT_ROOT)/$(COMPARE_BUILD_COMP_DIR) || true), \ + -2dirs $(COMPARE_BUILD_OUTPUT_ROOT)/$(COMPARE_BUILD_COMP_DIR) \ + $(OUTPUT_ROOT)/$(COMPARE_BUILD_COMP_DIR) $(COMPARE_BUILD_IGNORE_RESULT)), \ +(cd $(COMPARE_BUILD_OUTPUT_ROOT) && ./compare.sh $(COMPARE_BUILD_COMP_OPTS) \ - -o $(OUTPUT_ROOT) || true) \ + -o $(OUTPUT_ROOT) $(COMPARE_BUILD_IGNORE_RESULT)) \ ) endef