cd92b149b2cdf4a48548ef705c940b451621911dTinderbox User# Copyright (C) 2015-2017 Internet Systems Consortium, Inc. ("ISC")
551e0d486d45ce379fe6bfdd64945342850a0835Tinderbox User#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# This Source Code Form is subject to the terms of the Mozilla Public
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# License, v. 2.0. If a copy of the MPL was not distributed with this
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# file, You can obtain one at http://mozilla.org/MPL/2.0/.
551e0d486d45ce379fe6bfdd64945342850a0835Tinderbox User
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrewslist1=`grep LOGCATEGORY lib/*/include/*/*.h bin/named/include/named/*.h |
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrewsgrep "#define.*(&" |
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrewssed -e 's/.*LOGCATEGORY_\([A-Z_]*\).*/\1/' -e 's/^RRL$/rate-limit/' |
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrewstr '[A-Z]' '[a-z]' |
c63a8763f12d1889dbab51eb6a6b693ec37158daMark Andrewstr _ - | sed 's/^tat$/trust-anchor-telemetry/' | sort -u`
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrewslist2=`sed -n 's;.*<para><command>\(.*\)</command></para>;\1;p' doc/arm/logging-categories.xml | tr '[A-Z]' '[a-z]' | sort -u`
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrewsfor i in $list1
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrewsdo
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrews ok=no
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrews for j in $list2
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrews do
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrews if test $i = $j
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrews then
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrews ok=yes
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrews fi
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrews done
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrews if test $ok = no
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrews then
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrews echo "$i missing from documentation."
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrews fi
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrewsdone
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrewsfor i in $list2
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrewsdo
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrews ok=no
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrews for j in $list1
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrews do
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrews if test $i = $j
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrews then
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrews ok=yes
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrews fi
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrews done
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrews if test $ok = no
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrews then
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrews echo "$i not in code."
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrews fi
6c4f9b5cf604f77de996e0066bf8b53fb880c3a6Mark Andrewsdone