Guard against tests being skipped
This commit is contained in:
parent
ebbe65d4a2
commit
8ae5dec1db
1 changed files with 13 additions and 1 deletions
|
@ -66,7 +66,19 @@ install -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysusersdir}/%{name}.conf
|
|||
|
||||
|
||||
%check
|
||||
PYTHONPATH=%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}:$PWD trial-3 tests
|
||||
set -o pipefail
|
||||
PYTHONPATH=%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}:$PWD trial-3 tests | tee trial.stdout
|
||||
|
||||
# Guard against new types of tests being skipped.
|
||||
WHITELIST="Requires hiredis
|
||||
Requires jaeger_client
|
||||
Requires Postgres"
|
||||
REASONS=$(cat trial.stdout | sed -n '/^\[SKIPPED\]$/{n;p;}')
|
||||
SKIPPED=$(comm -23 <(echo "$REASONS" | sort | uniq) <(echo "$WHITELIST" | sort | uniq))
|
||||
if [ ! -z "$SKIPPED" ]; then
|
||||
echo -e "Failing, because tests were skipped:\n$SKIPPED"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
%pre
|
||||
|
|
Loading…
Reference in a new issue