diff --git a/matrix-synapse.spec b/matrix-synapse.spec index 69182ed..15b6bc7 100644 --- a/matrix-synapse.spec +++ b/matrix-synapse.spec @@ -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