21 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. |
21 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. |
22 # |
22 # |
23 include ../../make-rules/shared-macros.mk |
23 include ../../make-rules/shared-macros.mk |
24 |
24 |
25 COMPONENT_NAME= bind |
25 COMPONENT_NAME= bind |
26 COMPONENT_VERSION= 9.6-ESV-R10-P2 |
26 COMPONENT_VERSION= 9.6-ESV-R11 |
27 IPS_COMPONENT_VERSION= 9.6.3.10.2 |
27 IPS_COMPONENT_VERSION= 9.6.3.11.0 |
28 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
28 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
29 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
29 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
30 COMPONENT_PROJECT_URL= http://www.isc.org/software/bind/ |
30 COMPONENT_PROJECT_URL= http://www.isc.org/software/bind/ |
31 |
31 |
32 # hash from: sha256sum $(COMPONENT_ARCHIVE) | sed 's/\(.[^ ]*\).*/sha256:\1/' |
32 # hash from: sha256sum $(COMPONENT_ARCHIVE) | sed 's/\(.[^ ]*\).*/sha256:\1/' |
33 COMPONENT_ARCHIVE_HASH= \ |
33 COMPONENT_ARCHIVE_HASH= \ |
34 sha256:1b131ef3a3b27a7916815ec5f4a87f0d9f5ac0669df21c7ec75ba18a13238eda |
34 sha256:4f052195a62218c05a05033774452e6a9e329b865c01e594cc20a6adf11e0d0f |
35 COMPONENT_ARCHIVE_URL= \ |
35 COMPONENT_ARCHIVE_URL= \ |
36 http://ftp.isc.org/isc/bind9/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE) |
36 http://ftp.isc.org/isc/bind9/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE) |
37 COMPONENT_BUGDB= service/dns-server |
37 COMPONENT_BUGDB= service/dns-server |
38 |
38 |
39 include ../../make-rules/prep.mk |
39 include ../../make-rules/prep.mk |
98 # sumarize nawk script; reads ISC output which is of the form: |
98 # sumarize nawk script; reads ISC output which is of the form: |
99 # /^T:/ = Start of a test. |
99 # /^T:/ = Start of a test. |
100 # /^I:/ = Info from a test; colleced for possible use later. |
100 # /^I:/ = Info from a test; colleced for possible use later. |
101 # /^A:/ = About: summary of the test - not used here. |
101 # /^A:/ = About: summary of the test - not used here. |
102 # /^R:/ = Result: If 'PASS' then continue, else print line and collected info. |
102 # /^R:/ = Result: If 'PASS' then continue, else print line and collected info. |
103 # Known issues may then be accounted for. |
103 # Known issues may then be accounted for by adding tests, for example: |
|
104 # /^R:UNTESTED/ && name ~ /^T:dst:2:A/ {known++;}\ |
|
105 # /^R:UNRESOLVED/ && name ~ /^T:dst:1:A/ {known++;}\ |
104 # @ EOF = Display count of RESULTS: i.e. R:PASS=124 R:UNTESTED=26 Total=150 |
106 # @ EOF = Display count of RESULTS: i.e. R:PASS=124 R:UNTESTED=26 Total=150 |
105 # if not 100% pass rate and issue is not known the word 'issues!' is appended |
107 # if not 100% pass rate and issue is not known the word 'issues!' is appended |
106 # to resulting string. |
108 # to resulting string. |
107 summarize= '\ |
109 summarize= '\ |
108 /^T:/ {name=$$0;info="";}\ |
110 /^T:/ {name=$$0;info="";}\ |
109 /^I:/ {info=sprintf("%s%s\n", info, $$0);}\ |
111 /^I:/ {info=sprintf("%s%s\n", info, $$0);}\ |
110 /^R:/ {test++; result[$$1]++;}\ |
112 /^R:/ {test++; result[$$1]++;}\ |
111 /^R:PASS/ {next;}\ |
113 /^R:PASS/ {next;}\ |
112 /^R:/ {printf("%s: %s\n%s\n", $$1, name, info);}\ |
114 /^R:/ {printf("%s: %s\n%s\n", $$1, name, info);}\ |
113 /^R:UNTESTED/ && name ~ /^T:dst:2:A/ {known++;}\ |
|
114 /^R:UNRESOLVED/ && name ~ /^T:dst:1:A/ {known++;}\ |
|
115 END{for (item in result)\ |
115 END{for (item in result)\ |
116 printf("%s=%d ", item, result[item]);\ |
116 printf("%s=%d ", item, result[item]);\ |
117 printf("(known=%d) Total=%d%s\n", known, test, \ |
117 printf("(known=%d) Total=%d%s\n", known, test, \ |
118 ((result["R:PASS"] + known) < test)? \ |
118 ((result["R:PASS"] + known) < test)? \ |
119 " issues!" : "");\ |
119 " issues!" : "");\ |
124 .PHONY: test |
124 .PHONY: test |
125 test: build $(TEST_32) |
125 test: build $(TEST_32) |
126 |
126 |
127 # fulltest requires sufficient privileges to configures IP addresses |
127 # fulltest requires sufficient privileges to configures IP addresses |
128 # 10.53.0.1 through 10.53.0.5 as aliases on the loopback interface. |
128 # 10.53.0.1 through 10.53.0.5 as aliases on the loopback interface. |
|
129 # Note PATH is being set so that isc_ifconfig can find ifconfig. |
129 FULL_TEST_32= $(TEST_32:%=%_FULL) |
130 FULL_TEST_32= $(TEST_32:%=%_FULL) |
130 |
131 |
131 .PHONY: fulltest |
132 .PHONY: fulltest |
132 fulltest: build $(FULL_TEST_32) |
133 fulltest: build $(FULL_TEST_32) |
133 |
134 |
134 $(FULL_TEST_32): |
135 $(FULL_TEST_32): |
135 cd $(COMPONENT_SRC) && $(SHELL) $(isc_ifconfig) up |
136 cd $(COMPONENT_SRC) && PATH=/sbin:$(PATH) $(SHELL) $(isc_ifconfig) up |
136 -cd $(@D) && $(MAKE) test 2>&1 | $(TEE) $@ |
137 -cd $(@D) && $(MAKE) test 2>&1 | $(TEE) $@ |
137 cd $(COMPONENT_SRC) && $(SHELL) $(isc_ifconfig) down |
138 -cd $(COMPONENT_SRC) && PATH=/sbin:$(PATH) $(SHELL) $(isc_ifconfig) down |
138 $(NAWK) $(summarize) $@ |
139 $(NAWK) $(summarize) $@ |
139 |
140 |
140 $(TEST_32): |
141 $(TEST_32): |
141 -cd $(@D) && $(MAKE) test 2>&1 | $(TEE) $@ |
142 -cd $(@D) && $(MAKE) force-test 2>&1 | $(TEE) $@ |
142 $(NAWK) $(summarize) $@ |
143 $(NAWK) $(summarize) $@ |
143 |
144 |
144 # test-summary shows summary for targets test and fulltest. Use target |
145 # test-summary shows summary for targets test and fulltest. Use target |
145 # test-clean to remove previous tests. |
146 # test-clean to remove previous tests. |
146 .PHONY: test-summary |
147 .PHONY: test-summary |