babel/scripts/_get-test-directories.sh
Karl Cheng 3a55e1326c Allow substrings for TEST_ONLY in make (#6079)
This allows TEST_ONLY to match substrings of the package directory name
instead of having to use the full package directory name.
2017-08-10 10:55:46 -04:00

17 lines
237 B
Bash
Executable File

#!/bin/sh
set -e
TEST_DIRS=""
for f in packages/*; do
if [ -n "$TEST_ONLY" ] && [[ `basename $f` != *"$TEST_ONLY"* ]]; then
continue
fi
if [ -d "$f/test" ]; then
TEST_DIRS="$f/test $TEST_DIRS"
fi
done
echo $TEST_DIRS