Skip to content

Commit 9fc4937

Browse files
committed
scripts: Add script to list unused test files
This script will search through all the tests and look for files that aren't used, printing them out. It doesn't look at all.sh or other tests yet, just the test suites for now.
1 parent 7b57553 commit 9fc4937

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

scripts/list-unused-test-files.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
3+
# Abort on errors (and uninitialised variables)
4+
set -eu
5+
6+
if [ -d library -a -d include -a -d tests ]; then :; else
7+
echo "Must be run from mbed TLS root" >&2
8+
exit 1
9+
fi
10+
11+
ls tests/data_files | \
12+
while read f; do
13+
grep -R -F --exclude=Makefile "$f" tests >/dev/null || echo "$f"
14+
done

0 commit comments

Comments
 (0)