From: Evgeny Vereshchagin Date: Wed, 28 Nov 2018 03:50:04 +0000 (+0100) Subject: travis: make sure that *.perf and directives.* files are in sync X-Git-Tag: v240~196^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2ab58da1a6f0b6c51537d92c40208c2e00b97e9;p=thirdparty%2Fsystemd.git travis: make sure that *.perf and directives.* files are in sync New features are constantly added to networkd. Apparently, not everybody knows that the "directives" files should be updated too to make the fuzzers aware of them. --- diff --git a/tools/check-directives.sh b/tools/check-directives.sh new file mode 100755 index 00000000000..e2fd38898f3 --- /dev/null +++ b/tools/check-directives.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +set -e + +function generate_directives() { + perl -aF'/[\s,]+/' -ne ' + if (my ($s, $d) = ($F[0] =~ /^([^\s\.]+)\.([^\s\.]+)$/)) { $d{$s}{"$d="} = 1; } + END { while (my ($key, $value) = each %d) { + printf "[%s]\n%s\n", $key, join("\n", keys(%$value)) + }}' "$1" +} + +if [[ $(generate_directives src/network/networkd-network-gperf.gperf | wc -l) -ne $(wc -l