Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | # This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | # License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 4 | |
michael@0 | 5 | OUTPARAMS_WARNING_TESTCASES = \ |
michael@0 | 6 | e1.cpp \ |
michael@0 | 7 | e4.cpp \ |
michael@0 | 8 | e6.cpp \ |
michael@0 | 9 | e7.cpp \ |
michael@0 | 10 | e8.cpp \ |
michael@0 | 11 | e9.cpp \ |
michael@0 | 12 | e10.cpp \ |
michael@0 | 13 | e11.cpp \ |
michael@0 | 14 | e12.cpp \ |
michael@0 | 15 | e13.cpp \ |
michael@0 | 16 | $(NULL) |
michael@0 | 17 | |
michael@0 | 18 | OUTPARAMS_NS_FAILED_TESTCASES = \ |
michael@0 | 19 | e2.cpp \ |
michael@0 | 20 | e5.cpp \ |
michael@0 | 21 | $(NULL) |
michael@0 | 22 | |
michael@0 | 23 | OUTPARAMS_PASS_TESTCASES = \ |
michael@0 | 24 | o1.cpp \ |
michael@0 | 25 | o2.cpp \ |
michael@0 | 26 | o3.cpp \ |
michael@0 | 27 | o4.cpp \ |
michael@0 | 28 | o5.cpp \ |
michael@0 | 29 | o6.cpp \ |
michael@0 | 30 | o7.cpp \ |
michael@0 | 31 | o8.cpp \ |
michael@0 | 32 | o9.cpp \ |
michael@0 | 33 | o10.cpp \ |
michael@0 | 34 | o11.cpp \ |
michael@0 | 35 | o12.cpp \ |
michael@0 | 36 | o13.cpp \ |
michael@0 | 37 | o14.cpp \ |
michael@0 | 38 | o15.cpp \ |
michael@0 | 39 | o16.cpp \ |
michael@0 | 40 | onull.cpp \ |
michael@0 | 41 | onull2.cpp \ |
michael@0 | 42 | opmember.cpp \ |
michael@0 | 43 | $(NULL) |
michael@0 | 44 | |
michael@0 | 45 | FLOW_PASS_TESTCASES = \ |
michael@0 | 46 | flow_through_pass.cpp |
michael@0 | 47 | |
michael@0 | 48 | FLOW_FAILURE_TESTCASES = \ |
michael@0 | 49 | flow_through_fail.cpp |
michael@0 | 50 | |
michael@0 | 51 | MUST_OVERRIDE_PASS_TESTCASES = \ |
michael@0 | 52 | OverrideOK1.cpp \ |
michael@0 | 53 | OverrideOK2.cpp \ |
michael@0 | 54 | OverrideOK3-NamespaceTypedef.cpp \ |
michael@0 | 55 | $(NULL) |
michael@0 | 56 | |
michael@0 | 57 | MUST_OVERRIDE_FAILURE_TESTCASES = \ |
michael@0 | 58 | OverrideFail1.cpp \ |
michael@0 | 59 | OverrideFail2.cpp \ |
michael@0 | 60 | OverrideFail3.cpp \ |
michael@0 | 61 | OverrideFail4.cpp \ |
michael@0 | 62 | $(NULL) |
michael@0 | 63 | |
michael@0 | 64 | OVERRIDE_PASS_TESTCASES = \ |
michael@0 | 65 | override-pass.cpp \ |
michael@0 | 66 | override-namespace-typedef.cpp \ |
michael@0 | 67 | $(NULL) |
michael@0 | 68 | |
michael@0 | 69 | OVERRIDE_FAILURE_TESTCASES = \ |
michael@0 | 70 | override-global.cpp \ |
michael@0 | 71 | override-signature.cpp \ |
michael@0 | 72 | override-static.cpp \ |
michael@0 | 73 | override-virtual.cpp \ |
michael@0 | 74 | $(NULL) |
michael@0 | 75 | |
michael@0 | 76 | STATIC_INIT_PASS_TESTCASES = \ |
michael@0 | 77 | TestStaticInitStructOK.cpp \ |
michael@0 | 78 | $(NULL) |
michael@0 | 79 | |
michael@0 | 80 | STATIC_INIT_WARNING_TESTCASES = \ |
michael@0 | 81 | TestStaticInitAttr.cpp \ |
michael@0 | 82 | TestStaticInitConstructor.cpp \ |
michael@0 | 83 | TestStaticInitGlobal.cpp \ |
michael@0 | 84 | TestStaticInitGlobalConst.cpp \ |
michael@0 | 85 | $(NULL) |
michael@0 | 86 | |
michael@0 | 87 | STATIC_FAILURE_TESTCASES = \ |
michael@0 | 88 | $(FLOW_FAILURE_TESTCASES) \ |
michael@0 | 89 | $(MUST_OVERRIDE_FAILURE_TESTCASES) \ |
michael@0 | 90 | $(OVERRIDE_FAILURE_TESTCASES) \ |
michael@0 | 91 | $(NULL) |
michael@0 | 92 | |
michael@0 | 93 | STATIC_WARNING_TESTCASES = \ |
michael@0 | 94 | $(OUTPARAMS_WARNING_TESTCASES) \ |
michael@0 | 95 | $(STATIC_INIT_WARNING_TESTCASES) \ |
michael@0 | 96 | $(NULL) |
michael@0 | 97 | |
michael@0 | 98 | STATIC_PASS_TESTCASES = \ |
michael@0 | 99 | $(OUTPARAMS_NS_FAILED_TESTCASES) \ |
michael@0 | 100 | $(OUTPARAMS_PASS_TESTCASES) \ |
michael@0 | 101 | $(FLOW_PASS_TESTCASES) \ |
michael@0 | 102 | $(MUST_OVERRIDE_PASS_TESTCASES) \ |
michael@0 | 103 | $(OVERRIDE_PASS_TESTCASES) \ |
michael@0 | 104 | $(STATIC_INIT_PASS_TESTCASES) \ |
michael@0 | 105 | $(NULL) |
michael@0 | 106 | |
michael@0 | 107 | |
michael@0 | 108 | include $(topsrcdir)/config/rules.mk |
michael@0 | 109 | |
michael@0 | 110 | # We want to compile each file and invert the result to ensure that |
michael@0 | 111 | # compilation failed. |
michael@0 | 112 | check:: \ |
michael@0 | 113 | $(STATIC_FAILURE_TESTCASES:.cpp=.s-fail) \ |
michael@0 | 114 | $(STATIC_WARNING_TESTCASES:.cpp=.s-warn) \ |
michael@0 | 115 | $(STATIC_PASS_TESTCASES:.cpp=.s-pass) |
michael@0 | 116 | |
michael@0 | 117 | %.s-fail: %.cpp $(GLOBAL_DEPS) $(DEHYDRA_SCRIPTS) $(call mkdir_deps,$(MDDEPDIR)) |
michael@0 | 118 | @printf 'Compiling $(<F) to check that the static-analysis script is checking properly...' |
michael@0 | 119 | @if $(CCC) $(OUTOPTION)/dev/null -S $(COMPILE_CXXFLAGS) $(_VPATH_SRCS) >$(*F).errlog 2>&1; then \ |
michael@0 | 120 | printf 'fail:\nerror: compilation of $(<F) succeeded. It shouldn't have!\n'; \ |
michael@0 | 121 | exit 1; \ |
michael@0 | 122 | else \ |
michael@0 | 123 | printf 'ok.\n'; \ |
michael@0 | 124 | fi |
michael@0 | 125 | |
michael@0 | 126 | %.s-warn: %.cpp $(GLOBAL_DEPS) $(DEHYDRA_SCRIPTS) $(call mkdir_deps,$(MDDEPDIR)) |
michael@0 | 127 | @printf 'Compiling $(<F) to check that the static-analysis script is checking properly...' |
michael@0 | 128 | @if $(CCC) -Werror $(OUTOPTION)/dev/null -S $(COMPILE_CXXFLAGS) $(_VPATH_SRCS) >$(*F).errlog 2>&1; then \ |
michael@0 | 129 | printf 'fail:\nerror: compilation of $(<F) succeeded with -Werror. It shouldn't have!\n'; \ |
michael@0 | 130 | exit 1; \ |
michael@0 | 131 | fi |
michael@0 | 132 | @if $(CCC) $(OUTOPTION)/dev/null -S $(COMPILE_CXXFLAGS) $(_VPATH_SRCS) >$(*F).werrlog 2>&1; then \ |
michael@0 | 133 | printf 'ok.\n'; \ |
michael@0 | 134 | else \ |
michael@0 | 135 | printf 'fail:\nerror: compilation of $(<F) without -Werror failed. A warning should have been issued.\n'; \ |
michael@0 | 136 | exit 1; \ |
michael@0 | 137 | fi |
michael@0 | 138 | |
michael@0 | 139 | %.s-pass: %.cpp $(GLOBAL_DEPS) $(DEHYDRA_SCRIPTS) $(call mkdir_deps,$(MDDEPDIR)) |
michael@0 | 140 | @printf 'Compiling $(<F) to check that the static-analysis script is checking properly...' |
michael@0 | 141 | @if $(CCC) -Werror $(OUTOPTION)/dev/null -S $(COMPILE_CXXFLAGS) $(_VPATH_SRCS) >$(*F).errlog 2>&1; then \ |
michael@0 | 142 | printf 'ok.\n'; \ |
michael@0 | 143 | else \ |
michael@0 | 144 | printf 'fail:\nerror: compilation of $(<F) failed. It shouldn't have!\n'; \ |
michael@0 | 145 | exit 1; \ |
michael@0 | 146 | fi |