#!/bin/sh
# $Id$
# Check that each directory that contains a test/ directory has a makefile that has DIRS = .* test
cd $PTII

testdirs=/tmp/chktestdir.testdirs.$$

find . -type d -name test | egrep -v '(/adm/|/codeDoc/|/reports/|/vendors/)' | sort > $testdirs
# Skip ptolemy/acor/lib/jjs/node_modules because those directories may
# have test/ directories, but might not have makefiles.
cat $testdirs | awk '{print $1 "/../makefile"}' | grep -v ptolemy/actor/lib/jjs/node_modules | xargs grep 'DIRS =' | egrep -v '[ 	]test' | grep -v PTPOWERMOCK | grep -v PTCUNIT_DIR

rm -r $testdirs
