dgiot/scripts/find-suites.sh

17 lines
394 B
Bash
Raw Normal View History

2021-05-18 14:54:48 +08:00
#!/usr/bin/env bash
## this script prints out all test/*_SUITE.erl files of a given app,
## file names are separated by comma for rebar3 ct's `--suite` option
set -euo pipefail
# ensure dir
cd -P -- "$(dirname -- "$0")/.."
TESTDIR="test"
if [ "$1" != "emqx" ]; then
TESTDIR="$1/test"
fi
2022-12-29 18:13:09 +08:00
# shellcheck disable=SC2038
2021-05-18 14:54:48 +08:00
find "${TESTDIR}" -name "*_SUITE.erl" 2>/dev/null | xargs | tr ' ' ','