1#!/bin/sh
2
3# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
4#
5# SPDX-License-Identifier: MPL-2.0
6#
7# This Source Code Form is subject to the terms of the Mozilla Public
8# License, v. 2.0.  If a copy of the MPL was not distributed with this
9# file, you can obtain one at https://mozilla.org/MPL/2.0/.
10#
11# See the COPYRIGHT file distributed with this work for additional
12# information regarding copyright ownership.
13
14#
15# Clean up after system tests.
16#
17
18SYSTEMTESTTOP=.
19. $SYSTEMTESTTOP/conf.sh
20
21
22find . -type f \( \
23    -name '*~' -o -name 'core' -o -name '*.core' \
24    -o -name '*.log' -o -name '*.pid' -o -name '*.keyset' \
25    -o -name named.run -o -name ans.run \
26    -o -name '*-valgrind-*.log' \) -print | xargs rm -f
27
28status=0
29
30rm -f $SYSTEMTESTTOP/random.data
31
32for d in $SUBDIRS
33do
34   test ! -f $d/clean.sh || ( cd $d && $SHELL clean.sh )
35   rm -f test.output.$d
36   test -d $d && find $d -type d -exec rmdir '{}' \; 2> /dev/null
37done
38