find-props.sh 396 B

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