From ec2ecffef137da5635235330ce05b601f6d3a658 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 8 Feb 2019 12:19:39 +1100 Subject: [PATCH] add check-ans-prereq --- util/check-ans-prereq.sh | 26 ++++++++++++++++++++++++++ util/copyrights | 1 + 2 files changed, 27 insertions(+) create mode 100644 util/check-ans-prereq.sh diff --git a/util/check-ans-prereq.sh b/util/check-ans-prereq.sh new file mode 100644 index 0000000000..6c21d5c59d --- /dev/null +++ b/util/check-ans-prereq.sh @@ -0,0 +1,26 @@ +#!/bin/sh +# +# Copyright (C) Internet Systems Consortium, Inc. ("ISC") +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# See the COPYRIGHT file distributed with this work for additional +# information regarding copyright ownership. + +status=0 + +for testscript in bin/tests/system/*/tests.sh; do + testdir="$(dirname "${testscript}")" + prereq="${testdir}/prereq.sh" + if [ -e "${prereq}" ] || [ -e "${prereq}.in" ]; then + continue + fi + if find "${testdir}" -type d -name "ans*" | grep -Eq "/ans[0-9]+$"; then + echo "missing ${prereq}" + status=1 + fi +done + +exit ${status} diff --git a/util/copyrights b/util/copyrights index 3725ce19f5..ca3e993f42 100644 --- a/util/copyrights +++ b/util/copyrights @@ -2585,6 +2585,7 @@ ./util/COPYRIGHT.TOP X 2018,2019 ./util/bindkeys.pl PERL 2009,2010,2011,2012,2014,2016,2017,2018,2019 ./util/branchsync.sh SH 2013,2016,2018,2019 +./util/check-ans-prereq.sh SH 2019 ./util/check-categories.sh SH 2015,2016,2017,2018,2019 ./util/check-changes PERL 2002,2004,2007,2012,2016,2018,2019 ./util/check-cocci X 2018,2019