find-suites.sh 394 B

12345678910111213141516
  1. #!/usr/bin/env bash
  2. ## this script prints out all test/*_SUITE.erl files of a given app,
  3. ## file names are separated by comma for rebar3 ct's `--suite` option
  4. set -euo pipefail
  5. # ensure dir
  6. cd -P -- "$(dirname -- "$0")/.."
  7. TESTDIR="test"
  8. if [ "$1" != "emqx" ]; then
  9. TESTDIR="$1/test"
  10. fi
  11. # shellcheck disable=SC2038
  12. find "${TESTDIR}" -name "*_SUITE.erl" 2>/dev/null | xargs | tr ' ' ','