build/pymake/tests/override-propagate.mk

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 #T commandline: ['-w', 'OVAR=oval']
     3 OVAR=mval
     5 all: vartest run-override
     6 	$(MAKE) -f $(TESTPATH)/override-propagate.mk vartest
     7 	@echo TEST-PASS
     9 CLINE := OVAR=oval TESTPATH=$(TESTPATH) NATIVE_TESTPATH=$(NATIVE_TESTPATH)
    10 ifdef __WIN32__
    11 CLINE += __WIN32__=1
    12 endif
    14 SORTED_CLINE := $(subst \,\\,$(sort $(CLINE)))
    16 vartest:
    17 	@echo MAKELEVEL: '$(MAKELEVEL)'
    18 	test '$(value MAKEFLAGS)' = 'w -- $$(MAKEOVERRIDES)'
    19 	test '$(origin MAKEFLAGS)' = 'file'
    20 	test '$(value MAKEOVERRIDES)' = '$${-*-command-variables-*-}'
    21 	test "$(sort $(MAKEOVERRIDES))" = "$(SORTED_CLINE)"
    22 	test '$(origin MAKEOVERRIDES)' = 'environment'
    23 	test '$(origin -*-command-variables-*-)' = 'automatic'
    24 	test "$(origin OVAR)" = "command line"
    25 	test "$(OVAR)" = "oval"
    27 run-override: MAKEOVERRIDES=
    28 run-override:
    29 	test "$(OVAR)" = "oval"
    30 	$(MAKE) -f $(TESTPATH)/override-propagate.mk otest
    32 otest:
    33 	test '$(value MAKEFLAGS)' = 'w'
    34 	test '$(value MAKEOVERRIDES)' = '$${-*-command-variables-*-}'
    35 	test '$(MAKEOVERRIDES)' = ''
    36 	test '$(origin -*-command-variables-*-)' = 'undefined'
    37 	test "$(OVAR)" = "mval"

mercurial