-available=$(ls -1 $TEST_DIRECTORY/ | \
- sed -r -e "/^(aggregate-results.sh|Makefile|Makefile.local|notmuch-test)/d" \
- -e "/^(README|test-lib.sh|test-lib.el|test-results|tmp.*|valgrind|corpus*)/d" \
- -e "/^(emacs.expected-output|smtp-dummy|smtp-dummy.c|test-verbose|symbol-test.cc)/d" \
- -e "/^(test.expected-output|.*~)/d" \
- -e "/^(gnupg-secret-key.asc)/d" \
- -e "/^(gnupg-secret-key.NOTE)/d" \
- -e "/^(atomicity.gdb)/d" \
- | sort)
+available=$(find "$TEST_DIRECTORY" -maxdepth 1 -type f \
+ '(' -perm -100 -o -perm -10 -o -perm -1 ')' \
+ ! -name aggregate-results.sh \
+ ! -name arg-test \
+ ! -name hex-xcode \
+ ! -name notmuch-test \
+ ! -name parse-time \
+ ! -name random-corpus \
+ ! -name smtp-dummy \
+ ! -name symbol-test \
+ ! -name test-verbose \
+ | sed 's,.*/,,' | sort)