tests/installed: support TESTS filter
Lifted from rpm-ostree. Makes iterating on a single test much faster.
Example use:
TESTS=label-selinux ./ostree/tests/installed/run.sh
Closes: #1442
Approved by: cgwalters
This commit is contained in:
parent
5cba67520e
commit
6b95d51132
|
|
@ -4,6 +4,14 @@ set -xeuo pipefail
|
||||||
|
|
||||||
dn=$(dirname $0)
|
dn=$(dirname $0)
|
||||||
for tn in ${dn}/itest-*.sh; do
|
for tn in ${dn}/itest-*.sh; do
|
||||||
|
if [ -n "${TESTS+ }" ]; then
|
||||||
|
tbn=$(basename "$tn" .sh)
|
||||||
|
tbn=" ${tbn#itest-} "
|
||||||
|
if [[ " $TESTS " != *$tbn* ]]; then
|
||||||
|
echo "Skipping: ${tn}"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
fi
|
||||||
echo Executing: ${tn}
|
echo Executing: ${tn}
|
||||||
${tn}
|
${tn}
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue