From 302bf2bfdb8a89cf1b7d18b01420564dbb887317 Mon Sep 17 00:00:00 2001 From: ellie timoney Date: Wed, 11 Sep 2024 11:23:56 +1000 Subject: [PATCH] TestPlan: sanity check for unexpected extra tiny-tests directories --- cassandane/Cassandane/Unit/TestPlan.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cassandane/Cassandane/Unit/TestPlan.pm b/cassandane/Cassandane/Unit/TestPlan.pm index f1d484ca68..afce9dbecc 100644 --- a/cassandane/Cassandane/Unit/TestPlan.pm +++ b/cassandane/Cassandane/Unit/TestPlan.pm @@ -761,6 +761,16 @@ sub check_sanity die "$tt directory contains no tests" if not $ntests; } + + # whinge about 'tiny-tests' directories in unexpected places + # start searching in the parent directory so that we're checking the + # whole cyrus-imapd repository + my @unexpected_tt_dirs = grep { + chomp; + $_ ne '../cassandane/tiny-tests'; + } qx{find .. -type d -name tiny-tests}; + die "unexpected extra tiny-tests directories: @unexpected_tt_dirs" + if @unexpected_tt_dirs; } #