Debian Codegraph @

ansible_collections/community/libvirt/.azure-pipelines/scripts/process-results.sh

raw
1 #!/usr/bin/env bash
2 # Check the test results and set variables for use in later steps.
3
4 set -o pipefail -eu
5
6 if [[ "$PWD" =~ /ansible_collections/ ]]; then
7 output_path="tests/output"
8 else
9 output_path="test/results"
10 fi
11
12 echo "##vso[task.setVariable variable=outputPath]${output_path}"
13
14 if compgen -G "${output_path}"'/junit/*.xml' > /dev/null; then
15 echo "##vso[task.setVariable variable=haveTestResults]true"
16 fi
17
18 if compgen -G "${output_path}"'/bot/ansible-test-*' > /dev/null; then
19 echo "##vso[task.setVariable variable=haveBotResults]true"
20 fi
21
22 if compgen -G "${output_path}"'/coverage/*' > /dev/null; then
23 echo "##vso[task.setVariable variable=haveCoverageData]true"
24 fi