summaryrefslogtreecommitdiff
path: root/ci/scripts/validate-workflow.sh
blob: 3614953ee3c41fa597cb6b45481821bba2d79409 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash

set -euo pipefail

cd deps/${project}

trap 'catch $?' EXIT

catch() {
    rm expected_suites.txt actual_suites.txt
}

touch expected_suites.txt
for arg in "$@"; do
  echo "test/${arg}_SUITE.erl" >> expected_suites.txt
done
sort -o expected_suites.txt expected_suites.txt

touch actual_suites.txt
for f in test/*_SUITE.erl; do
  echo "$f" >> actual_suites.txt
done
sort -o actual_suites.txt actual_suites.txt

set -x
diff actual_suites.txt expected_suites.txt